
PHP Best Practices
3.0K installs AsyrafHussinBest for: Day-to-day PHP implementation and refactoring on a known PHP 8.x target
PHP Best Practices begins by checking composer.json or the runtime so an agent does not recommend language features the project cannot run. Its rule set separates type-system, modern-PHP, PSR, SOLID, error-handling, performance, and security decisions rather than treating PHP style as one generic prompt.
Use it as the broad implementation card when a PHP task needs a consistent baseline. It is especially useful before local edits spread unchecked choices about strict types, null handling, exceptions, autoloading, prepared statements, or password handling through a project.
- Version detection before language-feature advice
- Modern PHP 8.x features mapped to supported versions
- Strict types, PSR conventions, and exception boundaries
- Security and performance rules beside implementation guidance




