On 02/10/2018 15:57, Rasmus Schultz wrote:
I understand the $errcontext argument to the set_error_level()
callback was deprecated in 7.2.
Apparently, this was deemed "not useful", but what's the alternative?
Digging into the archives, and the RFC [1], there was a bit more to it
than "not useful"; capturing all variables in a local scope and making
them available somewhere else is problematic when it comes to
optimisation and analysis. This is particularly true since PHP has no
way of making this data immutable, so any error can theoretically cause
any local object to change state without being mentioned.
While I can understand the desire to have debugging feature built into
the language "out of the box", it may be best left to extensions which
can capture the information to a log or wherever without providing the
full flexibility of the language to interact with it.
[1]
https://wiki.php.net/rfc/deprecations_php_7_2#errcontext_argument_of_error_handler
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php