Skip to content

PHP

Documentation

Best Practices

Security

Debugging

Standard PHP Library (SPL)

TODO

PHP Types

Unicode / UTF-8

If you aren't using a framework you probably need to be using the mb_* variants of string functions. Also watch out for databases storing string in encoding different from UTF-8.

See https://phptherightway.com/#php_and_utf8

Misc

  • If you get a blank SOD, enable display of errors in php.ini. The location depends on the installation and web server but usually: /etc/php/X.Y/apache2/php.ini where X.Y is the PHP version.