php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33821 register_globals and array
Submitted: 2005-07-22 14:33 UTC Modified: 2005-07-22 15:07 UTC
From: php-work at yandex dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5CVS-2005-07-22 (dev) OS: Windows, Unix
Private report: No CVE-ID: None
 [2005-07-22 14:33 UTC] php-work at yandex dot ru
Description:
------------
Function highlight_file(file) prints error "Warning: Unterminated comment starting line 1" if in 'file':
<? /*

Reproduce code:
---------------
hl.php:
<?php
highlight_file("test.txt");
?>
test.txt:
<? /*

Actual result:
--------------
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?&nbsp;<br />
<b>Warning</b>:  Unterminated comment starting line 1 in <b>c:\pub\hl.php</b> on line <b>2</b><br />
</span>
</span>
</code>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-22 14:47 UTC] sniper@php.net
That clearly is unterminated, nothing wrong here.

 [2005-07-22 15:07 UTC] php-work at yandex dot ru
But why 'highlight_string' does not print the error?

$a = "<? /* ";
highlight_string($a);
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 10:00:01 2026 UTC