PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » Var_Dump » Bug #2574

Coloured var_dump() makes the class unusable

Details

Submitted2004-10-20 11:45 UTC
Fromraptor at quox dot net
Assignedfredericpoeydomenge
StatusClosed
PackageVar_Dump
PHP Version4.3.9
OSWindows 2000 Server
Roadmaps(Not assigned)

Comments

[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>