PHP & Zend Engine (50 Qs)•Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)
Error Hierarchy: `Throwable`, `Error`, and `Exception`.
senior LevelAsync & Promises
In Simple Words: Since PHP 7, fatal engine errors no longer crash the process abruptly:
- All errors and exceptions implement the
Throwableinterface. Error: Engine-level failures (TypeError,ParseError,DivisionByZeroError).Exception: Application-level domain exceptions (DatabaseException,ValidationException).- Catching
Throwableguarantees catching both fatal engine errors and application exceptions.