3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class main { function __construct() { } public function test() { } abstract function childmethod(); } class child extend main { function __construct() { } function childmethod() { return "test"; } } $main = new main(); $main->childmethod(); $main->test();
Output for 5.4.9 - 5.6.15
Parse error: syntax error, unexpected 'extend' (T_STRING), expecting '{' in /in/ea6cv on line 14
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/ea6cv on line 14
Process exited with code 255.