php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42767 highlight_string() 'eats' the unclosed comment
Submitted: 2007-09-26 12:20 UTC Modified: 2009-05-09 00:46 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: g0rn at mail dot ru Assigned: iliaa (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.4 OS: Linux
Private report: No CVE-ID: None
 [2007-09-26 12:20 UTC] g0rn at mail dot ru
Description:
------------
When I use highlight_string() on unclosed /* comment it doesn't returns anything, after this comment.

Reproduce code:
---------------
highlight_string('<?php /*some comment..');
highlight_string('<?php 
some code
some code
some code
/* some comment..');

Expected result:
----------------
In first example it should return:
<?php /*some comment..
In second:
<?php 
some code
some code
some code
/* some comment..

Actual result:
--------------
In first example it returns:
<?php
In second it returns:
<?php 
some code
some code
some code

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-26 15:46 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC