|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-18 13:01 UTC] tony2001@php.net
[2006-07-20 12:12 UTC] php dot net at benjamin dot schulz dot name
[2006-07-25 14:13 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Description: ------------ the array keys of protected properties in the array ReflectionClass::getStaticProperties gives are prefixed with "\0*\0" and therefore not accessible as "*propertyName" Reproduce code: --------------- <?php class foo { static protected $bar = 'baz'; } $class = new ReflectionClass('foo'); $properties = $class->getStaticProperties(); var_dump(isset($properties['*bar'])); // false var_dump(isset($properties["\0*\0bar"])); // true ?> Expected result: ---------------- true / false Actual result: -------------- false / true