The Forbidden PHP Features Encyclopedia
Within the vast realm of PHP development, certain features have incurred the disapproval of various developers, leading to their outright exclusion from conscientious coding practices. This comprehensive encyclopedia serves as a curated catalog, shedding light on the forbidden features that have faced scrutiny and are best avoided in the pursuit of secure, maintainable, and efficient PHP code. Explore this authoritative guide to safeguard your projects and adopt best practices in the ever-evolving landscape of PHP development.
Here are things that you should not use in your code. The reasons are behind the links.
- compact()
- closing tags
- else
- empty()
- eval()
- extends
- extract()
- global
- goto
- named parameters
- promoted properties
- runtime checks
- singleton pattern
- static methods
- traits
- one letter variables
- …
- variable variables