Re: a science mystery.

From: Date: Sat, 23 Apr 2005 01:42:26 +0000
Subject: Re: a science mystery.
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5781@lists.php.net to get a copy of this message
On Thu, April 21, 2005 6:58 am, Dimitri Giardina said: > [ot] > it's a question for maximum php experts (maybe in php list)... > [/ot] > > version php-4.3.7 under win32. > after using print_f or var_dump on a hierarchy of objects, dumping the > root, > and childs are linked with the root with a "parent" variable, and it made > apache go on 99% of cpu... WILD GUESS! You're creating a circular reference where one object points to another which points back to the second (possibly with N intermediate links) I *thought* PHP print_r() was smart enough to handle this... printf, however, probably wouldn't be. printf really doesn't know all that much about PHP Objects. var_dump() I would have expected to work, but maybe that's part of why print_r() exists... -- Like Music? http://l-i-e.com/artists.htm

« previous php.gtk.general (#5781) next »