Re: [RFC] Allow throwing exceptions from __toString()

From: Date: Wed, 01 May 2019 02:53:00 +0000
Subject: Re: [RFC] Allow throwing exceptions from __toString()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-105539@lists.php.net to get a copy of this message
On Tue, Apr 30, 2019 at 2:49 PM Stanislav Malyshev <smalyshev@gmail.com> wrote: > > That said, the work done on the patch is super impressive. I am > reasonably sure that Nikita caught as many instances of something going > wrong when string conversion fails as humanly possible. And I agree that > banning exceptions didn't actually solve the problem anyway, because > error handlers present the same exactly issue - exceptions are just much > more prominent and immediate in their effects, but with some hostile > coding - or even some inadvertently convoluted one - you'd run into the > same issues again. Some extensions will probably have some trouble - > though with high likelyhood they already do anyway. I second that "super impressive work". I'm certain some of why it's been deferred is because doing it was, well, unpleasant. Thanks Nikita for wrestling this. I spent an hour today going through the patch, especially its effect on the phar and imap extensions, and Zend/*. The patch seems good to me, minus a few targeted comments. But I'd still think this would be a "many eyes needed" kind of PR, especially from extension maintainers. +1 from me.

« previous php.internals (#105539) next »