Bug #16066 Updated: <?PHP tag warning!

From: Date: Fri, 15 Mar 2002 02:04:32 +0000
Subject: Bug #16066 Updated: <?PHP tag warning!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2540@lists.php.net to get a copy of this message
ID: 16066 Updated by: yohgaki@php.net Reported By: dave@netready.biz -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux (Debian) PHP Version: 4.1.1 New Comment: <?php, <?, <% is token that must be separated by spaces. (You need space after them) Therefore, this is not a bug . Previous Comments: ------------------------------------------------------------------------ [2002-03-14 09:29:53] dave@netready.biz 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 this bug report at http://bugs.php.net/?id=16066&edit=1

« previous php.bugs (#2540) next »