Am 30.01.2022 um 16:55 schrieb Nikita Popov <nikita....@gmail.com>:
> Something I want to add here is that there is also an important technical
> motivation behind promoting undefined variable notices to exceptions: The
> big problem with these (from a pure implementation perspective) is that we
> need to throw the warning and continue running. But the warning might call
> a custom error handler, which may modify state that the virtual machine
> does not expect to be modified. The PHP VM plays increasingly complex games
> to prevent this, but despite all that complexity, this problem cannot be
> fully solved while this remains a warning, rather than an exception.


Just so it has been mentioned: This could also be addressed by removing the 
warning (-:C

Out of curiosity: If undefined variables would be turned into exceptions, is 
the fact that now almost every operation can throw an exception that much 
easier to handle?

- Chris

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

Reply via email to