#38132 [Opn->Fbk]: static property names in ext/reflection are prefixed with \0*\0
| From: | tony2001@php.net | Date: | Tue, 18 Jul 2006 13:01:20 +0000 |
| Subject: | #38132 [Opn->Fbk]: static property names in ext/reflection are prefixed with \0*\0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99569@lists.php.net to get a copy of this message | ||
ID: 38132
Updated by: tony2001@php.net
Reported By: php dot net at benjamin dot schulz dot name
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: linux
PHP Version: 5.1.4
Assigned To: johannes
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-07-18 11:31:24] php dot net at benjamin dot schulz dot name
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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38132&edit=1