RE: [PHP] comment followed by ?> fails to parse

From: Date: Wed, 29 May 2002 10:31:35 +0000
Subject: RE: [PHP] comment followed by ?> fails to parse
Groups: php.general 
Request: Send a blank email to php-general+get-99678@lists.php.net to get a copy of this message
> -----Original Message----- > From: Thalis A. Kalfigopoulos [mailto:thalis@cs.pitt.edu] > Sent: 28 May 2002 20:21 > > If I write a comment line with // and I include in it ?> then > it fails to parse the rest of the page because (i'm guessing) > the parser gets confused and goes off PHP mode. > Is this normal? Shouldn't I be able to write literally > ANYTHING on a comment line? Quoting from http://www.php.net/manual/en/language.basic-syntax.comments.php: The "one-line" comment styles actually only comment to the end of the line or the current block of PHP code, whichever comes first. So this is documented behaviour. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#99678) next »