note 85666 added to language.oop5.reflection

From: Date: Thu, 11 Sep 2008 11:50:58 +0000
Subject: note 85666 added to language.oop5.reflection
Groups: php.notes 
Request: Send a blank email to php-notes+get-144333@lists.php.net to get a copy of this message
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' ---- Server IP: 92.48.74.199 Probable Submitter: 82.45.132.196 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.reflection.php Edit -- https://master.php.net/note/edit/85666 Del: integrated -- https://master.php.net/note/delete/85666/integrated Del: useless -- https://master.php.net/note/delete/85666/useless Del: bad code -- https://master.php.net/note/delete/85666/bad+code Del: spam -- https://master.php.net/note/delete/85666/spam Del: non-english -- https://master.php.net/note/delete/85666/non-english Del: in docs -- https://master.php.net/note/delete/85666/in+docs Del: other reasons-- https://master.php.net/note/delete/85666 Reject -- https://master.php.net/note/reject/85666 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144333) next »