Mantis - Quercus
Viewing Issue Advanced Details
5409 minor always 03-28-13 06:06 03-28-13 06:07
nam  
nam  
normal  
closed 4.0.35  
fixed  
none    
none 4.0.36  
0005409: static::$foo needs to return child's field when inside parent:: methods
(rep by V. Spivak)

Compiled mode is returning wrong value (123). Intepreted mode returns the correct value (456).

class A
{
  static $foo = 123;
  
  function fun()
  {
    echo "inside A->fun()\n";
    var_dump(static::$foo);
  }
}

class B extends A
{
  static $foo = 456;
  
  function fun()
  {
    echo "inside B->fun()\n";
    var_dump(static::$foo);

    parent::fun();
  }
}

$b = new B();
$b->fun();

Notes
(0006230)
nam   
03-28-13 06:07   
php/39y4