ID: 43908 Updated by: [EMAIL PROTECTED] Reported By: Arne dot Heizmann at csr dot com Status: Open Bug Type: *General Issues Operating System: Windows 2000 PHP Version: 5.2.5 New Comment:
Even easier to reproduce: <?php var_dump(exec("echo ' '")); ?> Previous Comments: ------------------------------------------------------------------------ [2008-01-22 16:51:56] Arne dot Heizmann at csr dot com Description: ------------ The exec() call is supposed to return the output of the system call into the second parameter. However, it modifies this output. It behaves as if rtrim() is called on each line. This causes data loss because rtrim() is not reversible. Reproduce code: --------------- <? header ('Content-type: text/plain'); file_put_contents ('temp', " "); // also reproducible with "\t" exec ("type temp", $ops, $result); echo var_export ($ops, true); ?> Expected result: ---------------- array ( 0 => ' ', ) Actual result: -------------- array ( 0 => '', ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43908&edit=1