ID: 44214 User updated by: php at bouchery dot fr Reported By: php at bouchery dot fr Status: Open Bug Type: Reproducible crash Operating System: Windows XP -PHP Version: 5.2.5 +PHP Version: 5.3.0-dev New Comment:
Same problem with nightly built "PHP 5.3.0-dev (cli) (built: Mar 3 2008 08:18:24)" Previous Comments: ------------------------------------------------------------------------ [2008-02-22 15:01:39] php at bouchery dot fr Description: ------------ When assigning callback parameter of preg_replace_callback into a global variable, PHP CLI interpreter crash at the end of the script. I generate this error with PHP v5.2.3.3, and I try the last 5.2.5.5, but the result is the same. Reproduce code: --------------- <?php $string = 'aaa bbb ccc ddd eee ccc aaa bbb'; $array = array(); function myCallBack( $match ) { global $array; $array[] = $match; return 'xxx'; } echo preg_replace_callback( '`a+`', 'myCallBack', $string); ?> Expected result: ---------------- No crash at the end of the script. Actual result: -------------- Windows crash report with signature error. --- AppName: php.exe AppVer: 5.2.5.5 ModName: php5ts.dll ModVer: 5.2.5.5 Offset: 0009a10a -- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44214&edit=1