@ 2015-09-30T08:28:06Z <?php
class a {
public static $foo = 'bar';
public function getStatic(){
return self::$foo;
}
}
class b {
public $classname = 'a';
}
$b = new b();
echo $b->classname::$foo;
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 bar Output for 5.4.2 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.7 - 5.6.28 Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ',' or ';' in /in/tOodB on line 15
Process exited with code 255 . preferences:dark mode live preview
165.81 ms | 402 KiB | 224 Q