php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41002 Tokenizer fails to parse T_OPEN_TAG
Submitted: 2007-04-05 11:54 UTC Modified: 2007-04-13 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tim dot whitlock at whiteinteractive dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 4.4.5 OS: Mac OS X 10.4
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: tim dot whitlock at whiteinteractive dot com
New email:
PHP Version: OS:

 

 [2007-04-05 11:54 UTC] tim dot whitlock at whiteinteractive dot com
Description:
------------
I have seen a report of this in bug #29761, but it is *NOT FIXED*
Actually I am on 4.4.4, but nothing in changelog about a fix in 4.4.5, or 4.4.6.

*Sometimes* token_get_all breaks T_OPEN_TAG into three separate entities. This is inconsistent, and I don't know what variable causes the glitch, (memory?)

Restarting web server fixes temporarily, but its back after a number of requests. I might have to refresh web page 50 times to see it break, but it will break eventually.

This glitch is fixable in PHP client code, but annoying and unnecessary


Reproduce code:
---------------
print_r( token_get_all( '<?php ' ) );

Expected result:
----------------
Array
(
    [0] => Array
        (
            [0] => 354
            [1] => <?php 
        )

)


// Where 354 === T_OPEN_TAG

Actual result:
--------------
Array
(
    [0] => <
    [1] => ?
    [2] => Array
        (
            [0] => 305
            [1] => php 
        )

)


// Where 305 === T_STRING

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 11:01:37 2024 UTC