Re: [PHP4BETA] Session: objects containing objects

From: Date: Fri, 25 Feb 2000 11:50:42 +0000
Subject: Re: [PHP4BETA] Session: objects containing objects
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.version4 
Request: Send a blank email to php-version4+get-10937@lists.php.net to get a copy of this message
Andrei Zmievski wrote: > class foo { > var $bar; > } > > $a = new foo; > get_class_vars($a); // will return array("bar"). > > $a->baz = 1; > get_class_vars($a); // will return array("bar", "baz") Regarding the earlier topic: The PHP4 serialzer seems to work okay, thank you. I'll later have a closer look at it. Regarding the topic above: // should return array("bar" => ""); // or whatever value foo:bar is statically assigned to. // since this operates on the class, it should always // return the same get_class_vars(foo); $a = new foo; // should return array("bar" => ""); get_class_vars($a) $a->baz = 1; // should return array("bar" => "", "baz" => "1"); get_class_vars($a); Kristian -- Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00 Using PHP3? See our web development library at http://phplib.netuse.de/ (We have moved! Update your bookmarks!)

« previous php.version4 (#10937) next »