ID: 47410 Updated by: der...@php.net Reported By: helenadeus at gmail dot com -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Linux PHP Version: 5.2CVS-2009-02-16 (snap) New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-02-21 13:29:55] fel...@php.net I can't reproduce it. ------------------------------------------------------------------------ [2009-02-16 20:01:34] helenadeus at gmail dot com Description: ------------ I'm running a script which tries to run something else in the background, like such: This code is inside a script called waiting.php <?php popen("php -f stall.php > tmp &','r'); ?> and stall.php is: <?php $V=array_combine(array('a','b','c'),array(1,2,3)); foreach ($V as $k=>$v) { echo $V[$k].chr(10); } ?> It works fine... until I use the function "array_combine" in the script stall.php For some reason, even though this function works fine both in the console and through apache, it crashes my code whenever I try to run it in the background. Any thoughts on why this happens? Reproduce code: --------------- This code is inside a script called waiting.php <?php popen("php -f stall.php > tmp &','r'); ?> and stall.php is: <?php $V=array_combine(array('a','b','c'),array(1,2,3)); foreach ($V as $k=>$v) { echo $V[$k].chr(10); } ?> Expected result: ---------------- tmp: 1 2 3 Actual result: -------------- tmp is empty ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47410&edit=1