3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class CTroll { public function hardTrolling(){echo "in hard trolling";} public funciton softTrolling(){echo "in soft trolling";} } $randomTroll = new CTroll(); $powerLevel = "hard"; $randomTroll->{$powerLevel}Trolling();
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'funciton' (T_STRING), expecting variable (T_VARIABLE) in /in/MeaSh on line 6
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/MeaSh on line 6
Process exited with code 255.