PHP Notes

Helping PHP

Ensuring all PHP files in the current directory are UTF-8 encoded on a Mac

for f in *.php; do iconv -f mac -t utf-8 "$f" >"$f.utf8"; done

PHP Logging

Perishable Press: How to Enable PHP Error Logging via htaccess
Perishable Press: Advanced PHP Error Handling via htaccess
Perishable Press: Advanced PHP Error Handling via PHP

Constant Value Notes
E_ALL 30719 All errors, warnings and notices (includes E_STRICT as of PHP 6.0.0)
E_ERROR 1 fatal run-time errors
E_WARNING 2 run-time warnings (non-fatal errors)
E_PARSE 4 compile-time parse errors
E_NOTICE 8 run-time notices (these are warnings which often result from a bug in your code, but it’s possible that it was intentional (e.g., using an uninitialized variable and relying on the fact it’s automatically initialized to an empty string)
E_CORE_ERROR 16 fatal errors that occur during PHP’s initial startup
E_CORE_WARNING 32 warnings (non-fatal errors) that occur during PHP’s initial startup
E_COMPILE_ERROR 64 fatal compile-time errors
E_COMPILE_WARNING 128 compile-time warnings (non-fatal errors)
E_USER_ERROR 256 user-generated error message
E_USER_WARNING 512 user-generated warning message
E_USER_NOTICE 1024 user-generated notice message
E_STRICT 2048 run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code
E_RECOVERABLE_ERROR 4096 almost fatal run-time errors
E_DEPRECATED 8192 warn about code that will not work in future versions of PHP
E_USER_DEPRECATED 16384 user-generated deprecation warnings
E_ALL & ~E_NOTICE 30711 E_ALL and not E_NOTICE
E_ALL & ~E_DEPRECATED & ~E_NOTICE 22519 E_ALL and not E_DEPRECATED or E_NOTICE
E_WARNING ¦ E_PARSE 6 E_WARNING + E_PARSE

References

Autoloading Examples

http://us.php.net/manual/en/language.oop5.autoload.php#99173
http://us.php.net/manual/en/language.oop5.autoload.php#98687
http://us.php.net/manual/en/language.oop5.autoload.php#97140

Language Reference

Basic Syntax
Types
Operators

Security

User Submitted Data

Features

PUT Method Support

Function Reference

FAQ

Appendices