Hi!

> However what it doesn't do, and what I wouldn't consider feasible to do, is
> ensure that every single string conversion in library functions is
> exception safe. Personally I don't think this is a blocking issue, as the
> worst that can happen is usually an additional superfluous warning to be
> thrown, or something similar. If cases like this turn up, we can
> specifically target them.

This sounds kind of dangerous, especially in combination with
convert_to_string. Of course, when using ZPP it's probably fine since
ZPP result will be checked, but when not I'm not sure what happens when
conversion is initiated otherwise - i.e. what the result would be and
what happens if the result is used since the code assumed if string
conversion didn't bail it returned some useful string.
I think this was the main reason we didn't allow exceptions in
__toString() - it's hard to handle them properly.

-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to