3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php final abstract class Foo { public static function FlipFlop() { return (bool) mt_rand(0, 1); } } // Dit werkt $bar = Foo::FlipFlop(); var_dump($bar); // Dit werkt niet $baz = new Foo(); $bar = $baz->FlipFlop();
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'abstract' (T_ABSTRACT), expecting class (T_CLASS) in /in/L9qH9 on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ABSTRACT, expecting T_CLASS in /in/L9qH9 on line 2
Process exited with code 255.