From:             [EMAIL PROTECTED]
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

Reply via email to