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
 [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

Add a Pull Request

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: Fri Aug 16 00:01:28 2024 UTC