a science mystery.

From: Date: Thu, 21 Apr 2005 13:58:05 +0000
Subject: a science mystery.
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5776@lists.php.net to get a copy of this message
[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... the question: two codes that should go in the same way... 0: $module=&new $module_name(); 1: $module->set_layout($layout); 2: $module->user_level=$user_level; 3: $this->modules[$key]=$module; 4: $this->modules[$key]->set_module_parent($key,&$this); 5: $this->modules[$key]->init(); 0: $module=&new $module_name(); 1: $module->set_module_parent($key,&$this); 2: $module->set_layout($layout); 3: $module->user_level=$user_level; 4: $this->modules[$key]=$module; 5: $this->modules[$key]->init(); post loading all modules, the second goes ok (it loads all modules and in the $this->modules variable i can found all items), the first lacks of the last element... (it must load 5 modules, with the first code it load 4 modules, the second load 5 modules). the difference is the 4th line in the first code and the 1st line in the second. someone should give me an explanation ? (the set_module_parent is: function set_module_parent($key,$parent) { $this->key_object=$key; $this->parent=$parent; } bye Dimitri Giardina System Administrator & Internet Programmer CD Informatica Srl. Chieti Scalo (CH) [ ITALY ] GnuPG public Key Available on wwwkeys.eu.pgp.net Key ID: 706C0422 Key fingerprint: 9515 B09F 46F9 CD80 2FCC BC91 8DB0 A770 706C 0422

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