Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.4

Bug #2574 Coloured var_dump() makes the class unusable
Submitted: 2004-10-20 11:45 UTC
From: raptor at quox dot net Assigned: fredericpoeydomenge
Status: Closed Package: Var_Dump
PHP Version: 4.3.9 OS: Windows 2000 Server
Roadmaps: (Not assigned)    
Subscription  


 [2004-10-20 11:45 UTC] raptor at quox dot net
Description: ------------ The var_dump() function from php now show's a colored output which makes the main regex from the class unusable. all matches are empty, so there is nothing returned. i think at least a pear error should be thrown? i don't know in which php version this has been changed, the documentation seems to be out of date for this change. Reproduce code: --------------- this shows the var_dump() change, copied from http://www.zend.com/manual/function.var-dump.php <?php $a = array (1, 2, array ("a", "b", "c")); var_dump($a); ?> Expected result: ---------------- array(3) { [0]=> int(1) [1]=> int(2) [2]=> array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } } Actual result: -------------- <pre> <b>array</b> 0 <font color='#777777'>=></font> <font color='#00bb00'>1</font> 1 <font color='#777777'>=></font> <font color='#00bb00'>2</font> 2 <font color='#777777'>=></font> <b>array</b> 0 <font color='#777777'>=></font> <font color='#bb00bb'>'a'</font> 1 <font color='#777777'>=></font> <font color='#bb00bb'>'b'</font> 2 <font color='#777777'>=></font> <font color='#bb00bb'>'c'</font> </pre>

Comments

 [2004-11-02 14:09 UTC] fredericpoeydomenge
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. I don't see in the official documentation, nor in the source code (see references below), any reference to a colored output for the var_dump function. What's more, the var_dump() function outputs its result in plain text, not in html ! There must be in your configuration something else that is causing this problem (perhaps a customised var_dump function defined somewhere ?). I'm also using php 4.3.9 but I can't reproduce the error. Could you check your configuration, and be more precise about the details please ? PHP_5_0_1 : http://cvs.php.net/co.php/php-src/ext/standard/var.c?r=1.196 PHP_5_0 : http://cvs.php.net/co.php/php-src/ext/standard/var.c?r=1.191.2.4 PHP_4_3 : http://cvs.php.net/co.php/php-src/ext/standard/var.c?r=1.150.2.16
 [2004-11-10 14:16 UTC] fredericpoeydomenge
I think I've found the origin of the problem : I've just installed the latest stable Xdebug package from PECL (1.3.2), and I've seen it overrides the default var_dump() function with its own fancy var dumping, without explicitly specifying it in the documentation (except in the changelog). I've reported a new bug in the PECL Xdebug package, and I'll contact Derick Rethans ASAP to see what's the most appropriate answer to this problem.
 [2004-11-24 14:24 UTC] fredericpoeydomenge
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Var_Dump Fixed in release 1.0.1