If you run this code in PHP 6 right now, you will get a nice memory
leak notice.
<?php
unicode_set_error_mode(FROM_UNICODE, U_CONV_ERROR_STOP |
U_CONV_ERROR_EXCEPTION);
$u = "< \u3844 >";
try {
$s = (binary)$u;
} catch (UnicodeConversionException $e) {
}
?>
/homes/andrei/dev/php-src/Zend/zend_unicode.c(461) : Freeing
0x013FC4E4 (1 bytes), script=e.php
From what Dmitry tells me, it is impossible to fix this with the way
our exceptions are implemented currently. I trust him on this, but at
the same time I think we need to do something. The conversions will be
happening in a lot of place and being able to catch an exception, if
one results, is an important part of the workflow. I think Dmitry
proposed that we could re-write exceptions implementation, but also
said that it would be a lot of work. I think we should seriously
consider it, though.
Thoughts?
-Andrei
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php