3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Create function with the name defined in variable $functionName function MyFunction($argument) { return 'Argument passed is: '.$argument; } $functionName = 'MyFunction'; var_dump(eval("return 'something';")); var_dump($functionName('Calling MyFunction with string.'));
Output for 5.4.0
string(9) "something" string(51) "Argument passed is: Calling MyFunction with string."