Re: How can I get a list of object vars?

From: Date: Thu, 02 Aug 2007 23:06:26 +0000
Subject: Re: How can I get a list of object vars?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-260103@lists.php.net to get a copy of this message
Thank you, it worked, but it contains some dust. Is it possible to remove the dust? <?php class Obj { private $priv; public $pub; protected $prot = 'foo'; } $obj = new Obj(); $obj->more_var = 'val'; foreach ((array)$obj as $k => $v) echo "$k = $v\n"; ?>

« previous php.general (#260103) next »