Req #54302 [Opn->Bgs]: var_dump truncates values with no option to output all values

From: Date: Fri, 18 Mar 2011 09:02:51 +0000
Subject: Req #54302 [Opn->Bgs]: var_dump truncates values with no option to output all values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-159579@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54302&edit=1

 ID:                 54302
 Updated by:         aharvey@php.net
 Reported by:        php at falconfour dot com
 Summary:            var_dump truncates values with no option to output
                     all values
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
 Package:            Variables related
 Operating System:   All
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

This is something XDebug does, not PHP. I'd suggest reporting it on the
XDebug issue tracker.


Previous Comments:
------------------------------------------------------------------------
[2011-03-18 09:57:08] php at falconfour dot com

Description:
------------
Simple as that... after var_dump() decides "enough is enough", it just
arbitrarily 
cuts off the rest of the value with ellipses.

Seriously annoying when trying to debug a script (the only time I use
var_dump - 
what other purpose does it serve in production?)... it produces a nice
HTML 
output, but 

Test script:
---------------
$test = array('foo');
$test['foo'] = array('bar');
$test['foo']['this'] = array('that');
$test['foo']['this']['where'] = array('there');
$test['foo']['this']['where']['your'] =
array('face');
$test['foo']['this']['where']['your']['mom'] =
array('fat');

var_dump($test);

Expected result:
----------------
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
  0 <font color='#888a85'>=&gt;</font> <small>string</small>
<font 
color='#cc0000'>'foo'</font> <i>(length=3)</i>
  'foo' <font color='#888a85'>=&gt;</font> 
    <b>array</b>
      0 <font color='#888a85'>=&gt;</font>
<small>string</small> <font 
color='#cc0000'>'bar'</font> <i>(length=3)</i>
      'this' <font color='#888a85'>=&gt;</font> 
        <b>array</b>
          0 <font color='#888a85'>=&gt;</font>
<small>string</small>
<font 
color='#cc0000'>'that'</font> <i>(length=4)</i>
          'where' <font color='#888a85'>=&gt;</font> 
            <b>array</b>
              0 <font color='#888a85'>=&gt;</font>
<small>string</small>
<font 
color='#cc0000'>'there'</font> <i>(length=5)</i>
              'your' <font color='#888a85'>=&gt;</font> 
                <b>array</b>
                  0 <font color='#888a85'>=&gt;</font>
<small>string</small> 
<font color='#cc0000'>'face'</font> <i>(length=4)</i>
                  'mom' <font color='#888a85'>=&gt;</font> 
                    <b>array</b>
                      0 <font color='#888a85'>=&gt;</font>
<small>string</small> 
<font color='#cc0000'>'fat'</font> <i>(length=3)</i>
</pre>

Actual result:
--------------
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
  0 <font color='#888a85'>=&gt;</font> <small>string</small>
<font 
color='#cc0000'>'foo'</font> <i>(length=3)</i>
  'foo' <font color='#888a85'>=&gt;</font> 
    <b>array</b>
      0 <font color='#888a85'>=&gt;</font>
<small>string</small> <font 
color='#cc0000'>'bar'</font> <i>(length=3)</i>
      'this' <font color='#888a85'>=&gt;</font> 
        <b>array</b>
          0 <font color='#888a85'>=&gt;</font>
<small>string</small>
<font 
color='#cc0000'>'that'</font> <i>(length=4)</i>
          'where' <font color='#888a85'>=&gt;</font> 
            <b>array</b>
              ...
</pre>


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54302&edit=1


Thread (3 messages)

« previous php.bugs (#159579) next »