ID: 43229 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Verified Bug Type: Reproducible crash Operating System: CentOS PHP Version: 5.2CVS-2007-11-09 (CVS) New Comment:
Looks like a problem happens because array is modified while array_walk is walking it. Previous Comments: ------------------------------------------------------------------------ [2007-11-09 20:45:28] [EMAIL PROTECTED] Description: ------------ strace doesnt output anything - it just cuts the output with a segfault. if you change the variable from $thiskeyword to something else without "this" at the start, it works correctly... ;) Reproduce code: --------------- <?php $stopwords = array( 'this', 'a', 'the', 'is' ); $keyword = explode( ' ', 'this is a big problem' ); for( $i = 0; $i < 1000; $i++ ) { $thiskeyword = $keyword; array_walk( $thiskeyword, create_function('$v,$k','global $thiskeyword,$stopwords;if(in_array($v,$stopwords)){unset($thiskeyword[$k]);}')); } ?> Actual result: -------------- Segmentation Fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43229&edit=1