ID:               20905
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Analyzed
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: linux
 PHP Version:      4.2.2
 New Comment:

This is now documented:
http://cvs.php.net/cvs.php/phpdoc/en/reference/exec/functions/exec.xml

Thanks for the report :)


Previous Comments:
------------------------------------------------------------------------

[2002-12-09 07:29:02] [EMAIL PROTECTED]

Reclassified.

The manual page for 'file()' does mention this.
But it should be mentionaed for 'exec()' too..(the optional array
output parameter..)


------------------------------------------------------------------------

[2002-12-09 07:25:48] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20905&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to