3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Car { public color = ""; public type; public function wheel (){ return "I have 4 wheels"; } public function tire (){ return 'size 17"'; } } $auto = new Car(); $auto->color = "red"; $auto->type = "sedan"; echo $car->wheel; echo $car->tire;
Output for 5.4.0 - 5.4.31
Parse error: syntax error, unexpected 'color' (T_STRING), expecting variable (T_VARIABLE) in /in/EB5Eq on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/EB5Eq on line 4
Process exited with code 255.