php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60069 highlight_file/string outputs extra "1"
Submitted: 2011-10-16 16:11 UTC Modified: 2011-10-16 16:19 UTC
From: pajoye@php.net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3SVN-2011-10-16 (SVN) OS:
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: pajoye@php.net
New email:
PHP Version: OS:

 

 [2011-10-16 16:11 UTC] pajoye@php.net
Description:
------------
An extra char is written using highlight_file.

Test script:
---------------
<?php echo highlight_file(__FILE__); ?>

or

<?php echo highlight_string(file_get_contents(__FILE__)); ?>

Expected result:
----------------
<code><span style="color: #000000">
<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: 
#0000BB">highlight_file</span><span style="color: #007700">(</span><span<br />
</span>: #0000BB">__FILE__</span><span style="color: #007700">);
</span>
</code>

Actual result:
--------------
<code><span style="color: #000000">
<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: 
#0000BB">highlight_file</span><span style="color: #007700">(</span><span<br />
</span>: #0000BB">__FILE__</span><span style="color: #007700">);
</span>
</code>1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-16 16:19 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2011-10-16 16:19 UTC] pajoye@php.net
forgot that highlight_* outputs the string directly, so annoying but documented > 
bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC