Get the Whitepaper called Better PHP Practices. It focuses on on security measures and implementations to enhance your code.
You can download it from the following link: https://packetstormsecurity.com/files/download/104786/better-php.txt
Source: https://packetstormsecurity.com/files/104786/Better-PHP-Practices.html