- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.29
- Fatal error: Cannot make static method Foo::x() non static in class Bar in /in/u9fna on line 11
Process exited with code 255.
<?php
class Foo
{
public static function x() { return 'x'; }
}
class Bar extends Foo
{
public function x() { return 'y'; }
}
var_dump(Foo::x());
var_dump((new Bar)->x());