ID: 40618 User updated by: ludwig at gramberg-webdesign dot de Reported By: ludwig at gramberg-webdesign dot de -Status: Bogus +Status: Open Bug Type: PCRE related Operating System: Windows 2000 PHP Version: 5.2.1 New Comment:
This bug exists under 5.2.1/win. I saw it here first as a bug under 5.2.1/debian and there it said the bug would is gone in 5.2.1 but under win it's definetly not. Just get the latest XAMPP, install it under win and run the code. The line 13/14 is just because i copied the code from the other bug report since it's the same. Previous Comments: ------------------------------------------------------------------------ [2007-02-26 08:06:47] [EMAIL PROTECTED] Warning: preg_replace_callback(): Unable to call custom replacement function in /tmp/4.php on line 14 Yay, exception! <--------- ------------------------------------------------------------------------ [2007-02-24 14:17:57] ludwig at gramberg-webdesign dot de Description: ------------ If a function called by preg_replace_callback throws an exception this exception is not propagated up to the function which called preg_replace_callback. Instead a PHP error is produced. This error contains no information about what the problem was or where it occurred. Reproduce code: --------------- <?php function thrower() { throw new Exception("Hello"); } try { $b = preg_replace_callback('/./', 'thrower', 'a'); } catch ( Exception $e ) { echo 'Yay, exception!'; } ?> Expected result: ---------------- code to output Yay, exception! Actual result: -------------- Warning: preg_replace_callback(): Unable to call custom replacement function on line 13 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40618&edit=1