Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
> > But EOL is not always \n and it can be a mix of \r\n \n or \r. You have > > no way of knowing which eol caused the break for any particular line. In > > that sense file() is irreversible. > > Why would I care about that, the EOL are not stripped by file(), so I do not > need to know EOLs when

Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
> Fixed bug #19971 (optimized the file() function). > The file() function is now also binary safe. That's a bit misleading. By definition file() cannot be binary-safe in that \n is treated specially. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
> > My point is that the original data is munged once it goes through the > > file() function. In that sense it is not binary safe as there is no > > way to restore the original data. > > Unless the user actually goes and modifies the data, it is very easy to > restore the original file back. The

Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
> On October 18, 2002 04:40 pm, Rasmus Lerdorf wrote: > > > Fixed bug #19971 (optimized the file() function). > > > The file() function is now also binary safe. > > > > That's a bit misleading. By definition file() cannot be binary-safe in > > that \n is treated specially. > > Not quite, in th