|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61555 Invalid key in Reflection class
Submitted: 2012-03-29 18:05 UTC Modified: 2012-03-29 18:43 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tlr at seegno dot com Assigned:
Status: Not a bug Package: Reflection related
PHP Version: 5.4.0 OS: CentOS 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tlr at seegno dot com
New email:
PHP Version: OS:


 [2012-03-29 18:05 UTC] tlr at seegno dot com
When creating a new Reflection object the key "name" displays a weird character.

Expected result:
ReflectionClass Object
 ([name] => Symfony\Bundle\FrameworkBundle\EventListener\SessionListener)

Actual result:
ReflectionClass Object
 ([namei˜¥] => Symfony\Bundle\FrameworkBundle\EventListener\SessionListener)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-29 18:24 UTC] tlr at seegno dot com
-Status: Open +Status: Closed
 [2012-03-29 18:24 UTC] tlr at seegno dot com
It appears it has to do with the version installed:
 [2012-03-29 18:43 UTC]
-Status: Closed +Status: Not a bug
 [2012-07-02 21:32 UTC] gm dot godlewski at gmail dot com
I've encountered the same problem on 5.4.3.


class Foo
	public $propertyA;
	public $propertyB;
	protected $propertyC;
	private $propertyD;

$class = new ReflectionClass('Foo');

foreach ($class->getProperties() as $property) {

string(9): "propertyA"
string(9): "propertyB"
string(9): "propertyC"
string(9): "propertyD"

boolean false
boolean false
boolean false
boolean false
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 07:01:49 2024 UTC