PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » PHP_CompatInfo » Bug #10100

Wrong parsing of possible attributes in strings.

Details

Submitted2007-02-14 16:44 UTC
Fromsimon at ruderich dot com
Assignedfarell
StatusClosed
PackagePHP_CompatInfo
PHP Version4.3.11
OSOS X 10.4
Roadmaps1.4.3, 1.4.2

Comments

[2007-02-14 16:44 UTC] simon at ruderich dot com

Description:
------------
Hi,
I tried to test this simple file with PHP_CompatInfo. But it
recognizes the "public" in this string not correct and
interprets it as public attribute of php 5.
This bugs also occurs with private/protected.
Could you please look into this.
Thanks,
Simon

Test script:
---------------
<?php
class Test
{
function test()
{
$test = "public$link";
}
}
?>

The $test = is not necessary to reproduce the bug, this works also:

<?php
class Test
{
function test()
{
"public$link";
}
}
?>

Expected result:
----------------
Version 3.0.0

Constants/Tokens: none

Actual result:
--------------
Version 5.0.0

Constants/Tokens: public

[2007-04-02 12:12 UTC] simon at ruderich dot com

Thanks for your fix. It worked for the test script I
provided, but I found another case where the bug still
occurs.

It still happens with this script, could you please look
into it.

<?php
function test()
{
$result = "data/public/$link";
}
?>

Also with this one:

<?php
function test()
{
"data/public/$link";
}
?>

Thanks for your support,
Simon