php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53621 Bug with PHP comment //
Submitted: 2010-12-28 17:12 UTC Modified: 2010-12-28 18:33 UTC
From: bruno dot boccara at d2b dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.4 OS: WINDOWS 2008 64BIT
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bruno dot boccara at d2b dot com
New email:
PHP Version: OS:

 

 [2010-12-28 17:12 UTC] bruno dot boccara at d2b dot com
Description:
------------
this script crash php:

<?=//$anything?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-28 17:46 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2010-12-28 17:46 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I cannot reproduce it.
 [2010-12-28 18:20 UTC] bruno dot boccara at d2b dot com
-Status: Feedback +Status: Open -Package: Reproducible crash +Package: Scripting Engine problem
 [2010-12-28 18:20 UTC] bruno dot boccara at d2b dot com
In fact, after some check into windows system alert, I don't see any php crash process.
when calling a php page with this kind of code, apache logs return a 200 code (so it should be Ok), but in fact the html page is totally blank.
more stange,
I tried to do:
<?
echo "test";
exit();
<?=//$anything?>
?>
it also return a blank page !!
after deleting the line with <?=//$anything?>, it works normally....
I lost 3 days trying to understand what's going on until I find this....
(I'm not new in PHP !!!)





For your info, the same script work perfectly under windows 2003 32, apache 2.0, php4.4.9
 [2010-12-28 18:32 UTC] rasmus@php.net
-Status: Open +Status: Bogus
 [2010-12-28 18:32 UTC] rasmus@php.net
It is a simple syntax error.  You must be suppressing error output/logging somehow 
or you would have seen the syntax error right away.  Since you have a syntax 
error, the script could not be parsed and thus could not be executed and you 
therefore get no output from it other than the error message.
 [2010-12-28 18:33 UTC] pajoye@php.net
This is a well known fact that // comments do not work on the same line than the opening php tag.

See the source of the page and you will certainly see the error message (between html tags).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 21:01:33 2025 UTC