3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Hail{ public $monday = function(){ return "monday"; } public $hello_monday = function(){ echo "what a beautiful ".$this->monday()."!"; } } $hoi = new Hail(); $hoi->{"hello_monday"}();
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in 8BOFP on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected T_FUNCTION in 8BOFP on line 4
Process exited with code 255.