ID:               47316
 Updated by:       j...@php.net
 Reported By:      john dot oconnor at totemic dot co dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      5.2.8
 New Comment:

It's still defined in Bar. No bug here.


Previous Comments:
------------------------------------------------------------------------

[2009-02-05 15:11:17] john dot oconnor at totemic dot co dot uk

Description:
------------
When calling a function in a static context, it appears that get_class
reports its class incorrectly.

Reproduce code:
---------------
class Foo extends Bar
{
  
}

class Bar
{
  function test()
  {
    return get_class(new self);
  }
}

print "Should report 'Foo': " . Foo::test();
print "Should report 'Bar': " . Bar::test();

Expected result:
----------------
Should report 'Foo': Foo
Should report 'Bar': Bar

Actual result:
--------------
Should report 'Foo': Bar
Should report 'Bar': Bar


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47316&edit=1

Reply via email to