Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Davey Shafik:
Changes to Engine Exceptions in PHP 7.0alpha2+
Jul 06, 2015 @ 14:41:29

Davey Shafik has posted about some changes in engine exceptions in the latest alpha of PHP 7 (alpha2+), mainly a small change to how things are named.

While updating my PHP 7 talk “What to Expect When You’re Expecting: PHP 7″ for the DutchPHP Conference 2 weeks ago I noticed a small but significant change to the new Engine Exceptions feature in the newly release alpha 2. [...] However, for alpha2 this hierarchy changed. Engine Exceptions lost their “Exception” suffix, and became Error and and *Error exceptions, and the abstract BaseException class was changed to a Throwable interface.

He points out that this new naming and structure makes it impossible to make a good hierarchal structure for exceptions. He does favor the new format, though, as it does allow for some structure via interface definitions.

tagged: exception handling php7 alpha2 throwable handling hierarchy

Link: http://daveyshafik.com/archives/69185-changes-to-engine-exceptions-in-php-7-0alpha2.html


Trending Topics: