From: [EMAIL PROTECTED] Operating system: FreeBSD 4.5-Stable PHP version: 4.1.2 PHP Bug Type: Filesystem function related Bug description: file() - incorrect behavior (line endings ignored) on files with Mac EOLN (CR)
In PHP 4.1.2 (and 4.2.0-dev) Calling file() on a 4-line text file with Macintosh line endings (CR) results in a 1-element array: file: (file.txt) blah test three four Code: $array = file( 'file.txt. ); echo count( $array ); >> Returns '1' (Verified by print_r) file() is ignoring the line endings, but the correct result happens for files with Windows (CRLF) and Unix (LF) line endings. -- Edit bug report at http://bugs.php.net/?id=16521&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16521&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16521&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16521&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16521&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16521&r=support Expected behavior: http://bugs.php.net/fix.php?id=16521&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16521&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16521&r=submittedtwice
