Re: parent_ctor()

From: Date: Tue, 18 Jul 2000 13:30:41 +0000
Subject: Re: parent_ctor()
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-24906@lists.php.net to get a copy of this message
On Tue, 18 Jul 2000, Kristian Köhntopp wrote: > I assume PHP4 objects are hashlike structures (again, not > having looked at the source), so that they can have any number > of slots at runtime, with any names. So I also assume that > $o->somevar is a hash lookup as well. Yes, it is. > I wonder why the hash cannot be fully populated at $o = new Someclass > time, containing all declared variables and functions. If that were > the case, an error would be raised when later $o->invalid_slot > returns NULL, instead of silently creating $o->invalid_slot. Why > is that slow? Or is the mental model I have of PHP objects > wrong? No, you're correct. After object initialization it contains its default properties and methods. -Andrei * Software never has bugs. It just develops random features. *

« previous php.dev (#24906) next »