note 85666 rejected from language.oop5.reflection by thiago

From: Date: Thu, 11 Sep 2008 13:32:07 +0000
Subject: note 85666 rejected from language.oop5.reflection by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144334@lists.php.net to get a copy of this message
Note Submitter: zemi dot inet at gmail dot com ---- Is there somebody who can clarify ReflectionProperty::isDefault() functionality? This is what I tried: class x { public $x = 1; public $y = 1; } $o = new x; $o->z = 1; $reflector = new ReflectionProperty($o, 'z'); $d = $reflector->isDefault(); I'm expecting $d == false but get: Fatal error: Uncaught exception 'ReflectionException' with message 'Property x::$z does not exist'

« previous php.notes (#144334) next »