Fw: [PHP-DEV] 4.0.6
| From: | Boian Bonev | Date: | Tue, 08 May 2001 15:32:29 +0000 |
| Subject: | Fw: [PHP-DEV] 4.0.6 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-54400@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Boian Bonev" <boian@bonev.com>
To: "Dave Jones" <JONESD@mps.ohio-state.edu>
Sent: Tuesday, May 08, 2001 6:29 PM
Subject: Re: [PHP-DEV] 4.0.6
> hi,
>
> > And also line number don't get incremented if there are no line ends, so
> > all syntax errors are reported as being on line 1.
> > The issue might have never come up if the code used "r" mode for opens
> > rather that "rb", since the file are 'text' files. On platforms that
> > don't used embedded newline characters as the record delimiters, the
> > implementation of fread is responsible for mapping the underlying file
> > format to cannonical form (i.e. \n's delimiting lines).
>
> you are partially correct - if we have only 'native' files - yes this is
the
> case. but imagine tons of downloaded code, parts of it originating from
*nix
> others from windows, and parts of them edited so all the three possible
> combinations are used. perhapse you know that most editors convert line
> endings only for edited lines not for the whole file. now the task of
> correctly counting line numbers is not that easy. neighter file conversion
> is. of course some editors pretend to be that clever to interprete all the
> three formats - something like greedy eating \n\r|\n|\r in this order...
>
> b.
>
forgot to say that php must flawlessly interprete all the combinations
provided that it is a platform independant language and never rely on os
specific stuff - win php source must work on unix as unix php source on
windows...