View Issue Details

IDProjectCategoryView StatusLast Update
0000667XdebugUncategorizedpublic2012-07-14 19:38
Reporterbhofmann Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
PlatformWindowsOSWindowsOS VersionWindows 7 32bit
Product Version2.1.0 
Target Version2.2.1Fixed in Version2.2.1 
Summary0000667: Class static members are shown in the locals when using context_get
Description

Hello,

If a class static field is accessed from outside the class, it starts to appear in the context_get response for the locals context.

Steps To Reproduce

When debugging the following, after the "Test::$staticMember = 10;" line, xdebug returns "$staticMember" as a local in context_get responses. It is marked as "uninitialized".

<?php

class Test {
public static $staticMember = 5;
}

Test::$staticMember = 10;

echo Test::$staticMember;

?>

TagsNo tags attached.
Operating SystemWindows 7 32bit
PHP Version5.3.3

Activities

derick

2012-04-28 00:04

administrator   ~0002112

Hi,

i can't fix this. PHP insists that there is a local variable called $staticMember. Xdebug merely shows the information coming from PHP. For some odd reason, PHP's parser sees $staticMember as a local variable. VLD shows this too:

derick@whisky:~/dev/php/xdebug$ php -dvld.active=1 tests/bug00667.inc
Finding entry points
Branch analysis from position: 0
Return found
filename: /home/derick/dev/php/xdebug/tests/bug00667.inc
function name: (null)
number of ops: 10
compiled vars: !0 = $staticMember

cheers,
Derick