Re: PHP 4.0 Bug #8211: Incorrect Parsing of <? and ?> tags

From: Date: Tue, 12 Dec 2000 18:25:54 +0000
Subject: Re: PHP 4.0 Bug #8211: Incorrect Parsing of <? and ?> tags
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-41049@lists.php.net to get a copy of this message
On 12 Dec 2000 rkenny@mke.catalystwms.com wrote: > From: rkenny@mke.catalystwms.com > Operating system: RedHat Linux 6.1 (kernel 2.2.16-3) > PHP version: 4.0.3pl1 > PHP Bug Type: Scripting Engine problem > Bug description: Incorrect Parsing of &lt;? and ?&gt; tags > > The following will generate a parse error: > > <? if ($var == "foo") { ?> <html>some stuff</html> <? } ?> > <? else if ($var == "bar" ) { ?> <html>other stuff</html> <? } > ?> > > But this works without error: > > <? if ($var == "foo") { ?> <html>some stuff</html> > <? } else if ($var == "bar" ) { ?> <html>other stuff</html> > <? } ?> > > Any help appreciated. > It probably has to do with the fact that the first example is "broken" by the switch between PHP and HTML. The nl is absorbed, but the switch still happens. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.dev (#41049) next »