3v4l.org

run code in 300+ PHP versions simultaneously
<?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.5.24 - 5.5.30, 5.6.8 - 5.6.15
Parse error: syntax error, unexpected 'extend' (T_STRING), expecting '{' in /in/ea6cv on line 14
Process exited with code 255.

preferences:
161.7 ms | 1395 KiB | 22 Q