php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44824 parse error from comment string
Submitted: 2008-04-24 20:46 UTC Modified: 2008-04-25 20:15 UTC
From: pfenderd at bellsouth dot net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.2.5 OS: windows XP Pro
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: pfenderd at bellsouth dot net
New email:
PHP Version: OS:

 

 [2008-04-24 20:46 UTC] pfenderd at bellsouth dot net
Description:
------------
The PHP parser produced output to the web page starting in the middle of a multi-line comment.  The trigger was a '>' at the end of a line of comment text.  All text after that character became output, even though it was within the <?php and ?> tags.

There were two email addresses, but the problem began at the end of the second email address string.  (see example below)

I previously used this code in PHP 5.1.6 with no problem.
The code was included from a file with a require_once statement.
(The names in the example are fictitious.)

Reproduce code:
---------------
<?php
/**
 * This file contains the XYZ class, "xyz"
 * Licensed under the BSD license
 * All credits to abcdefgh(http://www.abcdefgh.se/)
 * for letting this code out in the free where it belongs!
 *
 * Contributions made by:
 * Jorge Lopez <jorge.lopez@gmail.com>
 *
 * @author Robert "Littleguy" Shubert <anyman@abcdefgh.se>
 * @version 0.1
 * @package AB-XYZ
 */
?>


Expected result:
----------------
No output.

The parser should not have stopped parsing PHP code until the ?> string was reached.

Actual result:
--------------
 * @version 0.1
 * @package AB-XYZ
 */
?>
Error undefined class ....

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-25 18:10 UTC] pfenderd at bellsouth dot net
I tried the latest CVS snapshot (4/24) and did not see the problem.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 22:01:31 2025 UTC