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:
Funny... If (as you claim) this: <?/*Hello*/ print "Hello"; ?> is not a PHP script, howcome PHP actually prints out "Hello" in this situation? (with no warnings or errors) Is PHP in the habit of running code that is "not PHP script" ? So far both of your reasons for marking this bug as "bogus" have contradicted this example, which was in my original bug report and is something you could easily reproduce yourself. This gives me the impression that either you've not bothered reading my comments, you haven't understood what I'm saying or you think its not important enough to be worth fixing so you're making up lame excuses. Please read this bug report properly and think about it before marking it as "bogus" again. If you don't understand it or can't be bothered with it please refer it to someone who does/can, rather than just closing it. Whatever response you do give, PLEASE make sure it doesn't contradict something I've already explained, that is very frustrating. Previous Comments: ------------------------------------------------------------------------ [2002-03-15 06:59:01] [EMAIL PROTECTED] PHP will not raise error since it's not PHP script. There is no way to raise error, if it's not a PHP script. ------------------------------------------------------------------------ [2002-03-15 05:27:51] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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
