ID: 35821 Updated by: [EMAIL PROTECTED] Reported By: sfilteau at kronostechnologies dot com -Status: Open +Status: Assigned Bug Type: Reproducible crash Operating System: Gentoo PHP Version: 5.1.1 -Assigned To: +Assigned To: tony2001
Previous Comments: ------------------------------------------------------------------------ [2005-12-27 22:43:41] sfilteau at kronostechnologies dot com Description: ------------ In command line, php do a segfault when calling array_map with a callback function that throw an exception. Reproduce code: --------------- <?php class Element { public function ThrowException () { echo "This line will do a Segfault : "; throw new Exception('How to do a segfault?'); } public static function CallBack(Element $elem) { $elem->ThrowException(); } } $arr = array(new Element(), new Element(), new Element()); array_map(array('Element', 'CallBack'), $arr); ?> Expected result: ---------------- This line will do a Segfault : This line will do a Segfault : This line will do a Segfault : Actual result: -------------- [EMAIL PROTECTED] ~ $ ./testarraymap.php This line will do a Segfault : Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35821&edit=1