Stas Malyshev wrote on 27/07/2015 08:08:
Since discussion on this did not lead to a definite conclusion, but I did not hear from anybody that they need serialized exceptions, and we keep getting bug reports about exception serialization and various issues triggered by it, I propose this change: https://github.com/php/php-src/pull/1442
I agree that this is better than the status quo - although I would still prefer stripping out the 'args' from the exception backtrace, which has other benefits for predictable destructors etc.
Out of interest, is there any way to over-ride a denied serialization like this, using __sleep or Serializable? At the moment, you can create serializable sub-classes of exception, and retain a summarised copy of the backtrace: http://3v4l.org/IHPI5
It's not a big deal either way - in the rare cases where serialization of exception data is necessary, you could just write a wrapper to extract the public details - but I'm interested if my current hack will be adaptable if this change is applied.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php