This Gitbook serves as ready-to-use one-place reference for PHP secure codes that have been implemented in various sources/frameworks/articles on the web. Copyright and licensing belong to respective owners. If you like to implement them into your commercial products, make sure you check the source and its licensing terms for compliance.
Those code samples may not be easy copy-paste. They may require you to include associated functions in header files.
Detailed explanations of each attack can be found on OWASP and CWE sites. Hence, this book features only actionable secure code.
Regardless of saying a word "secure", those functions may possibly be bypassed or abused.
Happy secure coding,