3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Testable { public function test(); } abstract windows implements Testable { abstract function name(); } class window extends windows { public function name() { echo 'window'; } public function test() { echo $this->name() . 'test'; } } class home { public static function add(Testable $item) { $item->test(); } } $window = new window(); home::add($window);
Output for 5.4.0 - 5.4.4
Parse error: syntax error, unexpected 'windows' (T_STRING), expecting class (T_CLASS) in g29Xn on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.14
Parse error: syntax error, unexpected T_STRING, expecting T_CLASS in g29Xn on line 8
Process exited with code 255.

preferences:
171.78 ms | 1395 KiB | 27 Q