note 27808 deleted from language.basic-syntax by betz

From: Date: Sun, 03 Jul 2005 07:49:26 +0000
Subject: note 27808 deleted from language.basic-syntax by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-91334@lists.php.net to get a copy of this message
Note Submitter: de \ kibo \ niels ---- 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.

« previous php.notes (#91334) next »