|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-20 17:13 UTC] marcus at names dot co dot uk
[2005-07-30 00:49 UTC] sniper@php.net
[2005-08-01 10:35 UTC] marcus at names dot co dot uk
[2005-08-04 10:54 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 11:00:01 2025 UTC |
Description: ------------ Each line in the output array returned as the second parameter of exec() is trimmed so that all white space is removed, rather than just new line characters. I found this issue while trying to use the following command to find all files in the current directory whose name ends in a space: exec("find . -name '* '",$output_array,$status); However, in $output_array the filenames have been trimmed so that they no longer end in a space. Reproduce code: --------------- exec("find . -name '* '",$output_array,$status); Expected result: ---------------- array( "file1 " "file2 " ); Actual result: -------------- array( "file1" "file2" );