View Issue Details

IDProjectCategoryView StatusLast Update
0001501XdebugUncategorizedpublic2017-12-28 19:16
ReporterCharlotteDunois Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPHP 7.1.11 x86, PHP 7.2.0 x64 
Product Version2.5.5 
Target Version2.6.0Fixed in Version2.6.0beta1 
Summary0001501: Xdebug var dump tries casting properties
Description

The xdebug version of var_dump tries to cast numeric strings in class properties to integer, thus leading to wrong results. In my case those numeric strings were 64bit integers (as string, because integer overflow on 32bit systems), which ended up horribly wrong. So instead of $373556941768884244 I had ${830734356} in my dump.

This behaviour seems to have started in 2.5.0 and only affects PHP 7.1 and newer. Tests have shown that PHP 7.0 is unaffected.

TagsNo tags attached.
Attached Files
Operating System
PHP Version7.1.10-7.1.14

Activities

derick

2017-12-09 12:42

administrator   ~0004505

Would you please have a code snippet for me that demonstrates this?

CharlotteDunois

2017-12-09 23:31

reporter   ~0004506

Last edited: 2017-12-09 23:33

I just tried making a verifiable example and found out, that using __debugInfo will give you the weird output.

https://3v4l.org/uiPv8

Output with debugInfo:
class h#205 (1) {
public ${830734356} =>
string(5) "hallo"
}

Output without debugInfo:
class h#205 (1) {
public $data =>
array(1) {
[373556941768884244] =>
string(5) "hallo"
}
}

derick

2017-12-12 13:07

administrator   ~0004509

Thanks for your report, this should be fixed for Xdebug 2.6.0.

derick

2017-12-12 13:07

administrator   ~0004510

That said, you might want to test the 2.6.0beta1 binaries when they become available.

Issue History

Date Modified Username Field Change
2017-12-08 23:14 CharlotteDunois New Issue
2017-12-08 23:14 CharlotteDunois File Added: iivfD9lzHkcmBuG6cuoQcks2BAYgz0GVX3.png
2017-12-09 12:42 derick Note Added: 0004505
2017-12-09 12:42 derick Assigned To => derick
2017-12-09 12:42 derick Status new => feedback
2017-12-09 23:31 CharlotteDunois Note Added: 0004506
2017-12-09 23:31 CharlotteDunois Status feedback => assigned
2017-12-09 23:32 CharlotteDunois Note Edited: 0004506
2017-12-09 23:33 CharlotteDunois Note Edited: 0004506
2017-12-10 15:17 derick Status assigned => confirmed
2017-12-10 15:17 derick Target Version => 2.6.0
2017-12-10 15:17 derick Description Updated
2017-12-12 13:07 derick Note Added: 0004509
2017-12-12 13:07 derick Status confirmed => closed
2017-12-12 13:07 derick Resolution open => fixed
2017-12-12 13:07 derick Fixed in Version => 2.6.0
2017-12-12 13:07 derick Note Added: 0004510
2017-12-28 19:16 derick Fixed in Version 2.6.0 => 2.6.0beta1
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized