3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class Animal { public function breath() { return true; } public function eat() { return true; } abstract public function makeVoice(); // This means that the function is not defined, but must be in extending classes. } class Cat extends Animal { public function makeVoice() { echo "Meow!"; } public function destroyFurniture() { return true; } //New function, that is not a part of the parent class. }
Output for 5.0.0 - 7.2.0
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/tmQ2d on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CLASS in /in/tmQ2d on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/tmQ2d on line 3
Process exited with code 255.