Re: Long-Term Planning for PHP 9.0 Error Promotion

From: Date: Sun, 30 Jan 2022 16:41:17 +0000
Subject: Re: Long-Term Planning for PHP 9.0 Error Promotion
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-116954@lists.php.net to get a copy of this message
Am 30.01.2022 um 16:55 schrieb Nikita Popov <nikita.ppv@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

« previous php.internals (#116954) next »