|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-02-26 08:06 UTC] tony2001@php.net
[2007-02-26 09:17 UTC] ludwig at gramberg-webdesign dot de
[2007-02-26 09:25 UTC] tony2001@php.net
[2007-03-06 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
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