Re: default properties (in c)

From: Date: Wed, 09 Oct 2002 14:47:45 +0000
Subject: Re: default properties (in c)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-89288@lists.php.net to get a copy of this message
Brad LaFountain <rodif_bl@yahoo.com> writes: > Ok, > > I don't think default_properties is what you are looking for. > default_properties store the information about defined variables and their > default value. Like this: > class MyClass { > var $test = "mytest"; > } > at compile time MyClass class_entry will have "test" => "mytest" in its > default > properties. Where as: > $t = new MyClass(); > $t->other_test = "my other test"; > at runtime "other_test" => "my other test" will be stored in > zend_object.properties. So from your example I beleieve you are just trying to > do the second case. So if this is true then. > Brad, Thanks for your response! I _am_ actually trying to add a default property (the first case). I want to create a class with defined properties that have a default value, so that it works just as it would had I defined the class in PHP. -Tim

« previous php.dev (#89288) next »