ID: 16066 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Bogus +Status: Open Bug Type: Scripting Engine problem Operating System: Linux (Debian) PHP Version: 4.1.1 New Comment:
You say you must have a space after <?PHP, <? and <%. Then the bug is with the error reporting because: <?/*Hello*/ print "Hello"; ?> does not report an error, either way something is wrong here, because the behaviour is not consistant for all three of those tokens. I have looked at "Chapter 5. Basic syntax" section of the manual, this explains the use of the <?PHP, <? and <%... it does not say anything about requiring a space. Could this BUG be anything to do with the fact that you can do "<?=" and "<%=" but not "<?PHP=" ... which seems a little strange seeing as <?PHP is supposed to be the "propper" token. Previous Comments: ------------------------------------------------------------------------ [2002-03-14 21:04:32] [EMAIL PROTECTED] <?php, <?, <% is token that must be separated by spaces. (You need space after them) Therefore, this is not a bug . ------------------------------------------------------------------------ [2002-03-14 09:29:53] [EMAIL PROTECTED] 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
