#38132 [Asn->Csd]: static property names in ext/reflection are prefixed with \0*\0
ID: 38132
Updated by: iliaa@php.net
Reported By: php dot net at benjamin dot schulz dot name
-Status: Assigned
+Status: Closed
Bug Type: Class/Object related
Operating System: linux
PHP Version: 5.1.4
Assigned To: johannes
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
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)