----- Original Message -----
From: "Boian Bonev" <[EMAIL PROTECTED]>
To: "Dave Jones" <[EMAIL PROTECTED]>
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...



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to