php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #978 '//' comments don't work correctly?
Submitted: 1998-12-05 11:16 UTC Modified: 1998-12-05 16:57 UTC
From: auke at muze dot nl Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.5 OS: debian 2.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: auke at muze dot nl
New email:
PHP Version: OS:

 

 [1998-12-05 11:16 UTC] auke at muze dot nl
<?php
   echo "test<br>";
   // echo "blabla ?>";
   echo "this will not be executed";
?>

This script sees the '?>' in the outcommented string as the end of the php code. I'm not sure, but this looks incorrect to me (or at least I hope it's incorrect :)

When using /* .. */ style comments everything works as advertized :)

regards,
Auke van Slooten

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-12-05 16:57 UTC] zeev
This is intentional behavior, even though it's not trivial
to see it.  // comments work until the end of the line,
or the end of the PHP code, whichever comes first.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC