RE: [PHP] php3 / php4

From: Date: Mon, 20 Nov 2000 02:31:02 +0000
Subject: RE: [PHP] php3 / php4
Groups: php.general 
Request: Send a blank email to php-general+get-26180@lists.php.net to get a copy of this message
Think about this if you are a compiler. Do you compile comments? No, you throw them out the window. Ergo, your error line is one code line above the current line. eg <?php $x=1 //comment //comment print $x; ?> What about when it says you have a problem and its at the end of the file? You've probably forgotten to close a loop or structure, in which case the compiler will continue on until the end of the code and then say - hey no more code - but i still think i'm in a loop (or) structure - problem It doesn't magically know where you want to end your code... eg <?php function foo (bar) { $foo=$bar; ?> or <?php if ($x){ while ($x=$y) { $y=$x; } ?> This is where color coding or decent editors come in handy - you can set some editors to tree structurize your loops, so you can see where your loops or structures actually end. Does anyone know if there a lint type tool for php? -----Original Message----- From: Floyd Baker [mailto:fbaker@olm1.com] Sent: November 20, 2000 10:21 AM To: Marc Dondlinger Cc: php-general@lists.php.net Subject: Re: [PHP] php3 / php4 (I meant to say:) Whenever I get a parse error, the stated line is a line 'below' the actual error... Usually one line but with rem's, etc. the error is sometimes many lines up from the stated line. It seems to *never* be on the line it is said to be on. Floyd On Sun, 19 Nov 2000 12:26:14 +0100, you wrote: >Hello Php coders > >I'm sorry but i really need your help. I wrote my homepage in php3 code andf it was working properly but now my webserver got updated from php3 to php4 and my page is not working anymore at all. >I get now a "parse error on line xxx" but xxx represents no line at all , it's the last line of my html code where no php is in at all ... > >Any ideas what it could be ? >thank you very much > >Marc Dondlinger (aka HiGhPwR) >highpwr@quakeXtreme.com / highpwr@quake.lu >http://www.quakeXtreme.com / >http://www.quake.lu -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#26180) next »