PHP7 now has two exception classes, ExceptionandError. Both classes implement a new interface: Throwable. In your exception handling code, the type suggestion may need to be adjusted.
I. There are two Exception classes: Exception and Error.
PHP7 now has two Exception classes: Exception and Error. Both classes implement a new interface: Throwable. In your exception handling code, the type suggestion may need to be adjusted.
2. some fatal errors and recoverable fatal errors are changed to throwing Error objects..
Some fatal errors and recoverable fatal errors are now reported as Error objects. Error objects are independent from exceptions and cannot be caught by conventional try/catch objects. Editor's note: To register an error handler, refer to the RFC below.
The error handler cannot silently ignore the recoverable fatal errors that have been converted to exceptions. In particular, you cannot ignore error types.
3. syntax errors will throw a ParseError object
A syntax Error will throw a ParseError object inherited from the Error object. Before processing eval (), the ParseError object should be captured in addition to checking the returned value or error_get_last () for codes with potential errors.
4. internal object constructor will always throw an exception if the constructor fails.
If the internal object constructor fails, an exception is always reported. Some previous constructor methods return NULL or an unusable object.
5. some E_STRICT error levels have been adjusted.
VI. References
Https://wiki.php.net/rfc/engine_exceptions_for_php7
Https://wiki.php.net/rfc/throwableinterface
Https://wiki.php.net/rfc/internal_constructor_behaviour
Https://wiki.php.net/rfc/reclassify_e_strict