php.net |  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: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php dot net at benjamin dot schulz dot name
New email:
PHP Version: OS:

 

 [2006-07-18 11:31 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-18 13:01 UTC] 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-20 12:12 UTC] php dot net at benjamin dot schulz dot name
still not working
 [2006-07-25 14:13 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Feb 03 08:01:31 2025 UTC