Michael Morris wrote on 21/07/2015 18:11:
Hi.  I hate to ask an outright question on the list rather but I've been
searching the last 5 hours for an answer to this and haven't found anything
and it's a rather tight corner case. I'm working on a small package for PHP
5.x that uses set_error_handler() to convert E_RECOVERABLE_ERRORs to the
appropriate PHP 7 exceptions.  I know I can't emulate things exactly - my
goal is to get things so that PHPUnit tests can use the same
@expectedException annotation for these scenarios, simplifying unit test
writing.

As far as my research has found E_RECOVERABLE_ERROR has only ever been used
for type hint failures.  Are there any other errors that have this type,
and if so to what PHP 7 exception should they be converted?


You should be able to figure out with a grep of the source code for use of that constant (it has the same name in C as in PHP). A quick glance on lxr.php.net shows a few other uses: http://lxr.php.net/search?q=&defs=&refs=E_RECOVERABLE_ERROR&path=&hist=&project=PHP_5_6

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to