php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62366 Reflection problem
Submitted: 2012-06-19 22:29 UTC Modified: 2013-02-17 23:06 UTC
From: alejosimon at gmail dot com Assigned:
Status: No Feedback Package: Reflection related
PHP Version: 5.4.4 OS: Win7 x64
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
38 + 20 = ?
Subscribe to this entry?

 
 [2012-06-19 22:29 UTC] alejosimon at gmail dot com
Description:
------------
The some methods of reflection class don´t return the correctly values.

Test script:
---------------
<?php

$object = new \stdClass ;
$ref = new \ReflectionClass( $object ) ;

var_dump( $ref->getName() ) ;
var_dump( $ref->name ) ;

print_r( $ref ) ;
var_dump( $ref ) ;

?>

Expected result:
----------------
string(8) "stdClass"
string(8) "stdClass"

ReflectionClass Object
(
    [name] => stdClass
)
object(ReflectionClass)#37 (1) {
  ["name"]=>
  string(8) "stdClass"
}

Actual result:
--------------
bool(false)
string(8) "stdClass"

ReflectionClass Object
(
    [namei��] => stdClass
)
object(ReflectionClass)#37 (1) {
  ["name"]=>
  string(8) "stdClass"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-20 00:09 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2012-06-20 00:09 UTC] felipe@php.net
I can't reproduce it. Are you using any external extension?
 [2012-06-20 17:02 UTC] alejosimon at gmail dot com
Yes!! I'm sorry, this bug is from the APC extension. Without APC everything works 
perfect.

I´m use APC 3.1.9 and .10

Thanks for your time.
 [2013-02-17 23:06 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 15:01:29 2024 UTC