|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-21 13:29 UTC] felipe@php.net
[2009-02-22 18:23 UTC] derick@php.net
[2009-03-02 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
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