Mantis - Quercus
Viewing Issue Advanced Details
3155 minor always 12-12-08 00:15 12-14-08 12:06
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003155: Can't access static member of superclass declared after subclass
<?php
class Child extends Mommy {
  public static function foo() {
    print parent::$var;
  }
}
class Mommy {
  public static $var = 'hi there';
}
Child::foo();

This works in regular PHP. In Quercus it prints "Fatal Error: Mommy::$var is an undeclared static property".

In our real-world case, these two classes are in separate .php files, if that matters.

Notes
(0003611)
koreth   
12-12-08 11:50   
This is low priority, BTW. I was able to rearrange our include_once directives so the superclass gets loaded first, in which case the error doesn't occur.
(0003622)
ferg   
12-14-08 12:06   
php/394h