I am looking for methods for performing sanity checks of PHP code during development
I hope to to avoid finding out about the coding mistakes the hard way, but instead find them before publishing the website.
display_errors = on and similar run-time methods find the problems too late.
So far I have found the following ways, which I think are not thorough enough:
php_check_syntax()from within PHPphp -lfrom the command line- Ioncube PHP encoder
- Using editors with error checking like NetBeans and Eclipse
Are there more ways to find problems in PHP code early?
PHP Code Sniffer can help ensure you’re writing code to a set standard.
http://pear.php.net/package/PHP_CodeSniffer/
Incidentally, if you want to get really into code checking, you can integrate Code Sniffer, PHPUnit and a repo together with something like phpUnderControl for automating such a process.