Advanced
PHP · Proficient - advanced patterns and performance
- Modern OOP: classes, promoted properties, visibilityWrite idiomatic PHP 8 classes: property promotion, readonly, named constructors and immutable value objects.
- Inheritance, interfaces, traits and abstract classesChoose the right design tool - a contract, an algorithm skeleton or horizontal reuse - by knowing the trade-offs of each.
- PDO: prepared statements and transactionsConfigure PDO the way production does, structurally eliminate SQL injection and make your writes reliable with transactions.
- Namespaces, autoloading and ComposerStructure your code with PSR-4 namespaces and let Composer load classes and dependencies for you.
- Exceptions: hierarchy, finally, global handlerBuild a complete error strategy: chained business exceptions, controlled finally and global handlers as a last line of defense.