|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-29 15:06 UTC] felipe@php.net
[2013-09-12 16:51 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Description: ------------ Always getting exception when creating ReflectionProperty object on dynamicly created property. Discovered when I tried to use ReflectionProperty::isDefault(). I presume it returns true when property is created on compile-time and false when dynamicly created on run-time? Reproduce code: --------------- class x { public $x = 1; public $y = 1; } $o = new x; $o->z = 1; $reflector = new ReflectionProperty($o, 'z'); $d = $reflector->isDefault(); Expected result: ---------------- $d == false Actual result: -------------- Fatal error: Uncaught exception 'ReflectionException' with message 'Property x::$z does not exist' on line: $reflector = new ReflectionProperty($o, 'z');