exec() bug?

From: Date: Thu, 25 Jan 2001 23:30:57 +0000
Subject: exec() bug?
Groups: php.general 
Request: Send a blank email to php-general+get-36729@lists.php.net to get a copy of this message
Hi, Can someone confirm this behavior on their system. I've tried it on 4.0.2 and 4.03pl1, both on Linux boxes, both with the same results. echo "One Character: " . exec("echo 't'",$tmp) . "<br>\n"; echo "One Character: " . $tmp[0] . "<br>\n"; echo "Two Characters: " . exec("echo 'te'",$tmp) . "<br>\n"; My output is: One Character: One Character: t Two Characters: te It seems if the output of exec is one character it gets discarded somewhere. The ouput is correct in the array argument, but the "last line of output" is not returned by the function if the length of the "last line of output" is 1. Thanks, Dustin

« previous php.general (#36729) next »