3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php abstract class Foo { abstract public function __construct(); } class FooTest extends Foo { public function setUp() { $this->object = 'xx'; } public function testNothing() { $this->object = 'y'; } } $foo = new FooTest;
Output for 5.2.3 - 5.5.0
Fatal error: Class FooTest contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Foo::__construct) in /in/3Fa2X on line 18
Process exited with code 255.
Output for 5.0.5 - 5.2.2
<br /> <b>Fatal error</b>: Class FooTest contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Foo::__construct) in <b>/in/3Fa2X</b> on line <b>18</b><br />
Process exited with code 255.
Output for 5.0.2 - 5.0.4
<br /> <b>Fatal error</b>: Class FooTest contains 1 abstract methods and must therefore be declared abstract (Foo::__construct) in <b>/in/3Fa2X</b> on line <b>18</b><br />
Process exited with code 255.
Output for 5.0.0 - 5.0.1
<br /> <b>Fatal error</b>: Cannot instantiate abstract class FooTest in <b>/in/3Fa2X</b> on line <b>20</b><br />
Process exited with code 255.
Output for 4.4.2 - 4.4.9
<br /> <b>Parse error</b>: syntax error, unexpected T_CLASS in <b>/in/3Fa2X</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
<br /> <b>Parse error</b>: parse error, unexpected T_CLASS in <b>/in/3Fa2X</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/3Fa2X</b> on line <b>2</b><br />
Process exited with code 255.