<?php
class A{
static $var;
function test(){
var_dump(self::$var);
}
}
class B extends A{
static $var = 'something';
}
$b = new B();
$b->test();
?>
why does this print out null and how do I fix this? It works if I do not set $var as static but i need it to be accesible without creating an instance.