|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-09 07:29 UTC] sniper@php.net
[2003-01-19 00:48 UTC] philip@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
This is just basically an inconsistency between file() and exec() file() will return the newline on the end of each element in the array, ie: $data = file("somefile.txt"); $data[0][ strlen($data[0])-1 ] == "\n" but exec() doesn't put newlines on it's output: exec("soemthing", $data); $data[0][ strlen($data[0])-1 ] != "\n" At the least, the manual page for file() and/or exec() should state this behaviour.