Search code examples
phpstrict

Where can I find the PHP Strict Standards Definitions


All I ever see of the PHP Strict Standards are errors reported when (ini_get('error_reporting') & E_STRICT) == true. Correcting these errors in an error driven way seems to be not optimal.

So in order to write code that is perfectly compliant with the PHP Strict Standards out of the box I would like to read what is defined in them. Where can I find the PHP Strict Standards?

All the searching I have done only leads to instructions of how to fix some arbitrary error reported by the Strict Standards, but never the Strict Standards themselves. Can anyone please provide a link?


Solution

  • The only way to know where all possibilities for an E_STRICT to be emitted would be to grep the source looking for E_STRICT. Basically, look here at the master branch: http://lxr.php.net/search?q=&defs=&refs=E_STRICT&path=Zend%2F&hist=&project=PHP_TRUNK. Note that in some cases master may differ from a particular version in what E_STRICT errors are raised and when.

    Of course, understanding PHP's source would be difficult without an understanding of C and some of the common internals terminology.