"Stefan Walk" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > class Foo { > function dump() { > var_dump(array_key_exists('bar', (array)$this)); > } > } > $foo = new Foo; > $foo->bar = null; > $foo->dump(); > // => bool(true) > > It's not that hard to detect. IMHO, array_key_exists can be used this way, but it shouldn't. The function name has a meaning specific for arrays. We must have a not so specific way to detect if a variable(or attribute) exists or not.
Cristiano Duarte. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php