|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58019 abstract static function related
Submitted: 2008-01-24 11:10 UTC Modified: 2009-02-16 20:20 UTC
From: jochem at iamjochem dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 3.0.14 OS: Linux 2.6.14-1.1644_FC4smp i386
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: jochem at iamjochem dot com
New email:
PHP Version: OS:


 [2008-01-24 11:10 UTC] jochem at iamjochem dot com
APC does not recognise static functions defined in subclasses  of abstract classes that originally defines the function as an abstract.

I came accross this on a production machine which started acting up... I traced a different problem to likely be related to the version of APC I did have installed (namely 3.0.9) ... I upgraded APC to 3.0.16 and the above fatal error occurred ... I downgraded to APC 3.0.15 and the problem went away.

I therefore presume that this bug is a regression between 3.0.15 and 3.0.16.

I cannot garantee that the reproduce code actually causes the error as I did not have time to test it (I had to fix the server and get the site back up :-(). my actual code is more complex than this example and the classes are in seperate files.

if the reproduce code does not reproduce I will take the time to setup an environment where my original code causes the fatal error and work out a usable test case. please let me know if this is the case.

thanks and regards,

Reproduce code:
abstract class Foo 
    abstract static function bar();

class FooEx extends Foo
    static function bar() { echo "hello world"; }


Expected result:
that 'hello world' appears.

Actual result:
PHP Fatal error:  Cannot call abstract method Foo::bar()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-24 11:26 UTC] jochem at iamjochem dot com
further investigation saw that the problem also actually occurs in 3.0.14 and 3.0.15 - although unlike in 3.0.16 the Fatal Error only started occurring after the relevant page was requested a number of times. 

3.0.13 does not exhibit this behaviour
 [2008-01-29 20:19 UTC]
Sorry, I'm unable to reproduce this with the given example and the latest CVS.  Can you please verify that your repro code actually causes this error?
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Sep 30 19:05:53 2022 UTC