| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2008-03-03 15:27 UTC] php at bouchery dot fr
  [2008-03-03 22:31 UTC] nlopess@php.net
  [2008-03-08 13:12 UTC] nlopess@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 00:00:01 2025 UTC | 
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 --