3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function perg($dari, $ke, $callback) { echo "Saya pergi dari {$dari} menuju ke {$ke}."; if(is_callable($callback)){ $callback(); } } pergi('Jakarta','Bandung', function(){ echo 'Saya mau pulang kampung dulu'; }
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected end of file in JKQip on line 12
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected $end in /in/JKQip on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected $end in JKQip on line 12
Process exited with code 255.