Archive for the ‘PHP’ Category

I’m all for this proposal, that would solve some issues that make php look dirty. But seems from this blog post that they are thinking on implementing it as an optional feature. This means that you must provide, throught an extension or php code or anything else, the strict checking stuff.

I think doing that as an optional feature is a fail for PHP as the whole point after type hinting is to force strict types in the parameters of a function call and force the caller of the function to cast&check the types saving time to the function developer and also keeping the peace of mind of knowing that an integer parameter will be always an integer. Also allowing devels to specify the semantic of optional hints can be a source of incoherent behaviour in APIs beetween applications.

PHP is a powerfull dynamic language, but has a lots of stuff that causes more suffering than benefit. I wonder when will came the time to clean up, break the damm backward compatibility and let it evolve to the next level.

Its as easy as:
[terminal]
php_value error_reporting 24575
[/terminal]
Note that you can’t use php constants for errors. 24575 is the value of ((E_ALL ^ E_DEPRECATED) | E_STRICT) that disables deprecation warnings and turns on everything else. You should check constant values or write a php script and print the value to be set.