|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38132 static property names in ext/reflection are prefixed with \0*\0
Submitted: 2006-07-18 11:31 UTC Modified: 2006-07-25 14:13 UTC
From: php dot net at benjamin dot schulz dot name Assigned:
Status: Closed Package: Class/Object related
PHP Version: 5.1.4 OS: linux
Private report: No CVE-ID:
 [2006-07-18 11:31 UTC] php dot net at benjamin dot schulz dot name
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:
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-18 13:01 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-07-20 12:12 UTC] php dot net at benjamin dot schulz dot name
still not working
 [2006-07-25 14:13 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 02:01:29 2015 UTC