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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 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";
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux