Bug #16066: <?PHP tag warning!

From: Date: Thu, 14 Mar 2002 14:29:55 +0000
Subject: Bug #16066: <?PHP tag warning!
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2480@lists.php.net to get a copy of this message
From: dave@netready.biz Operating system: Linux (Debian) PHP version: 4.1.1 PHP Bug Type: Scripting Engine problem Bug description: <?PHP tag warning! There is an error with the parsing of the PHP start tag "<?PHP"... Turn on all error reporting... error_reporting( E_ALL ); This works ok <?PHP /*Hello*/?> However without the space it outputs a warning: "Warning: Use of undefined constant PHP - assumed 'PHP'" <?PHP/*Hello*/?> But this (correctly) doesn't output anything... <?/*Hello*/?> If you put code after the comment it is worse. <?PHP/*Hello*/ print "Hello"; ?> This actually dies with a "parser error", but again this works if you use the shorter tag. <?/*Hello*/ print "Hello"; ?> Outputs "Hello" as expected. The fact that it works when you use "<?" instead of "<?PHP" is what leads me to believe this is a bug and not just a feature of the language. Surely they should both behave the same? -- Edit bug report at http://bugs.php.net/?id=16066&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16066&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16066&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16066&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16066&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16066&r=support Expected behavior: http://bugs.php.net/fix.php?id=16066&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16066&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16066&r=submittedtwice

« previous php.bugs (#2480) next »