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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Sun Feb 25 09:01:26 2024 UTC