Home » PHP » Var_Dump » Bug #3965
Unable to dump big size Object
Details
| Submitted | 2005-03-26 10:36 UTC |
|---|---|
| From | tibolists at free dot fr |
| Assigned | fredericpoeydomenge |
| Status | Closed |
| Package | Var_Dump |
| PHP Version | 4.3.8 |
| OS | Linux Mandrake 10.1 |
| Roadmaps | (Not assigned) |
Comments
[2005-03-26 10:36 UTC] tibolists at free dot fr
Description:
------------
Hi,
I do use HTML_QuickForm_Controller.
I did a controller with 3 pages and input fields in each of the pages.
if I print_r($mycontroller), it's print out.
if I var_dump($mycontroller) it's print out.
if I Var_Dump::display($mycontroller) nothing happend, the execution stop and do not output anything.
Doing the same in the same source code, with a smaller variable outputs the good result well formatted.
I can say that there is some HTML content in my input fields value in the pages of the controller.
But well, what should be the problem, as even if I
echo "something"; before the call of Var_Dump::display(), nothing output, it's figure out that the code fail somewhere in the Var_Dump class.
Thanks
Olivier
Reproduce code:
---------------
//many code to construct my controller and pages and inputs and setdefault value for input. the controller is named $tabbed.
Var_Dump::displayInit(array('display_mode' => HTML4_Table'));
echo "displaying the dump<br/>";
$str =Var_Dump::display($tabbed, true);
echo $str;
//Really nothing output
[2005-04-12 12:55 UTC] tibolists at free dot fr
Hi,
I did the echo memory usage as you ask me to.
I did 2 different test, with and without the call of Var_Dump::Display()
Test 1:
* echo of memory usage : 42704936
* creation of objects
* echo of memory usage : 43288424
Test 2:
* echo of memory usage : 42704936
* creation of objects
* Call of Var_dump::Display($tabbed): => error:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 37035563 bytes) in /usr/share/pear/Var_Dump.php on line 195
* echo of memory usage : does not display do to error before...
The problem seems to be in the Var_Dump::Display().
the code:
Var_Dump::displayInit(array('display_mode' => 'HTML4_Table'));
$str = Var_Dump::display($tabbed, true); // Failed
echo memory_get_usage();
$tabbed->run();
Hope that help you.
Rgs,
Olivier
Ps: it's working well with smaller object, the problem seems to be a recursion test problem in Var_Dump...