Re: 4.0.6

From: Date: Tue, 08 May 2001 12:50:31 +0000
Subject: Re: 4.0.6
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-54380@lists.php.net to get a copy of this message
it is not that odd because it may have treated it like whitespace - imagine a long line script. now it may treat it not as whitespace and hence the problem there is no big difference between whitespace and newline(s) in php, is it?
Both today (4.0.6-dev) and earlier \r is treated as whitespace. However, in previous versions including 4.0.5 and 4.0.4pl1 "\r" would not mark line endings such as end of // or # comments. So there is no way that I can think of that a script would have worked with 4.0.4pl1 and not with 4.0.5. Anyway, it doesn't really matter now because 4.0.6 should work.
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). --------------------------------------------------------------------------- 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). ---------------------------------------------------------------------------
David L. Jones               |      Phone:    (614) 292-6929
Ohio State Unviversity       |      Internet:
1971 Neil Ave. Rm. 406       |               jonesd@kcgl1.eng.ohio-state.edu
Columbus, OH 43210           |               jones-d@eng.ohio-state.edu


« previous php.dev (#54380) next »