#38132 [Opn->Asn]: static property names in ext/reflection are prefixed with \0*\0
ID: 38132
Updated by: sniper@php.net
Reported By: php dot net at benjamin dot schulz dot name
-Status: Open
+Status: Assigned
-Bug Type: Unknown/Other Function
+Bug Type: Class/Object related
Operating System: linux
PHP Version: 5.1.4
Assigned To: johannes
Previous Comments:
------------------------------------------------------------------------
[2006-07-20 12:12:56] php dot net at benjamin dot schulz dot name
still not working
------------------------------------------------------------------------
[2006-07-18 13:01:20] tony2001@php.net
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
------------------------------------------------------------------------
[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
Thread (5 messages)