Is it possible to do something like this :
class foo
{
private $array = array();
function __construct()
{
...
}
function __get($key)
{
return (isset($this->array[$key]) == false ? null :
$this->array[$key]);
}
function __set($key, $value)
{
$this->array[$key] = $value;
}
}
$foo = new foo();
if (isset($foo->bar) == false)
$foo->bar = 'bar';
else
echo $foo->bar;
It seems that isset($foo->bar) return ALWAYS false.
Bug ?
Fred.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php