note 27808 added to language.basic-syntax
| From: | de at rack1 dot php dot net | Date: | Thu, 19 Dec 2002 12:19:17 +0000 |
| Subject: | note 27808 added to language.basic-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41119@lists.php.net to get a copy of this message | ||
A follow-up to the first posting on this page: If you're writing PHP code on a non-UNIX system
like MacOS (and even on a UNIX system like Mac OS X!), be very careful about line breaks.
Although this was apparently fixed in 4.0.5, I got the weirdest errors while testing PHP scripts
that I wrote in BBEdit (6.5) on MacOS X (10.2, running Apache 1.3.27 with PHP 4.1.2).
The Mac-style line breaks (\r) that BBEdit usually produces by default confuse the PHP parser, and
it will report the strangest parse errors. (I even got errors in lines of code that were commented
out! This drove me nuts for days).
Your documents have to use UNIX-style linebreaks (\n) to prevent these errors. It's advisable
to configure BBEdit to produce UNIX line breaks by default in every new document (preferences!).
This problem possibly also occurs with DOS/Win systems whose linebreaks are \r\n.
--
http://www.php.net/manual/en/language.basic-syntax.php
http://master.php.net/manage/user-notes.php?action=edit+27808
http://master.php.net/manage/user-notes.php?action=delete+27808
http://master.php.net/manage/user-notes.php?action=reject+27808