Forum Moderators: coopster

Message Too Old, No Replies

var dump

dump results have changed

         

nyteshade

10:59 pm on Sep 22, 2011 (gmt 0)

10+ Year Member



A little bit ago I noticed that my var_dumps went from looking like:
var_dump($states)

array(5) {
["DC"]=>
string(13) "Washington DC"
["OH"]=>
string(4) "Ohio"
["VA"]=>
string(8) "Virginia"
["MI"]=>
string(8) "Michigan"
["TX"]=>
string(5) "Texas"
}


to:

var_dump($states)

array
'DC' => string 'Washington DC' (length=13)
'OH' => string 'Ohio' (length=4)
'VA' => string 'Virginia' (length=8)
'MI' => string 'Michigan' (length=8)
'TX' => string 'Texas' (length=5)


This has occurred on my local machine running PHP5.3.0 (been installed for more than a year). When I upload the same file to my ISP(PHP5.2.17) the var_dump output reverts to the previous format.

Every page with var_dump now has many errors for each var_dump line complaining about 'element font not found' and such regarding the 'new' formatting. The only thing I changed on my local box was to add xdebug plugin to notepad++ this morning. Anyone familiar with this behavior? Suggestions? Thanks all.

nyteshade

12:08 am on Sep 23, 2011 (gmt 0)

10+ Year Member



Hmmm, I'm looking at the document 'source' results in ff and here's the var_dump output, and it appears that xdebug has added a class to the <pre> element:
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
0 <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'DC'</font> <i>(length=2)</i>

1 <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'OH'</font> <i>(length=2)</i>
2 <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'VA'</font> <i>(length=2)</i>

3 <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'MI'</font> <i>(length=2)</i>
4 <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'TX'</font> <i>(length=2)</i>

</pre>

Arrgh! So, this isn't a PHP problem, but, hehehe, if anyone has experienced this then please feel free to share. Thx!

nyteshade

1:26 am on Sep 23, 2011 (gmt 0)

10+ Year Member



Found my answer at: //xdebug.org/docs/display

coopster

11:22 pm on Sep 29, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



And thanks for that needle in the haystack. Probably going to save somebody else the trouble of pulling out their hair :)