View Issue Details

IDProjectCategoryView StatusLast Update
0000667XdebugUncategorizedpublic2012-07-14 19:38
Reporterbhofmann Assigned Toderick  
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.
Attached Files
xdebug.log (46,102 bytes)
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

Issue History

Date Modified Username Field Change
2011-02-23 09:18 bhofmann New Issue
2011-02-23 09:18 bhofmann File Added: xdebug.log
2012-03-12 16:41 derick Target Version => 2.2.1
2012-04-28 00:04 derick Note Added: 0002112
2012-04-28 00:04 derick Status new => resolved
2012-04-28 00:04 derick Resolution open => not fixable
2012-04-28 00:04 derick Assigned To => derick
2012-07-14 19:38 derick Fixed in Version => 2.2.1
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized