View Issue Details

IDProjectCategoryView StatusLast Update
0001501XdebugUncategorizedpublic2017-12-28 19:16
ReporterCharlotteDunois Assigned To 
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.
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.