|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 - 3 = ?
Subscribe to this entry?

 [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-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 14:01:27 2023 UTC