On 3/15/2017 11:40 PM, Marco Pivetta wrote:
> Which is precisely the BC break: such a library would now throw an
> exception "unsupported class X" when `__toString` is implemented. Also,
> such a library would break silently when this feature is implemented.
> 
> Much like the already very broken `__debugInfo()`, this automatic type-cast
> is a giga-Joule footgun.

I have to backup Ocramius here. As I already wrote, let's go for a
totally normal implementation without any kind of magic. This is the
only way to be safe, and the only way without adding more weirdness. All
this special casing and magic only creates problems in short and long term.

-- 
Richard "Fleshgrinder" Fussenegger

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

Reply via email to