php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30001 problem in //
Submitted: 2004-09-06 18:04 UTC Modified: 2004-09-07 18:44 UTC
From: mydwin at msn dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.1 OS: Windows 2003 enterprise
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: mydwin at msn dot com
New email:
PHP Version: OS:

 

 [2004-09-06 18:04 UTC] mydwin at msn dot com
Description:
------------
I try this code

it seem that ?> works in // line
why ?

after this.
I try the same code but using /*  */ instead //
it works find and get the right result.

Reproduce code:
---------------
<xmp><?php

$str = 'gogo<hr>cc<br>test';
// $str = '/(.*?)(<\/?.*?>


echo $str;
?>

Expected result:
----------------
gogo<hr>cc<br>test


Actual result:
--------------
echo $str;
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-06 19:18 UTC] pollita@php.net
Because that's intended behavior.

http://www.php.net/manual/en/language.basic-syntax.comments.php
 [2004-09-07 18:44 UTC] mydwin at msn dot com
Well ..
I see.

just like javascript

<script>
//</script>ff
</script>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 10:01:27 2024 UTC