3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $functionName = 'MyFunction'; // Create function with the name defined in variable $functionName function MyFunction($argument) { return 'Argument passed is: '.$argument; } /*var_dump(MyFunction('Calling MyFunction directly.')); var_dump({'MyFunction'}('Calling MyFunction with string.'));*/
Output for 4.3.0 - 7.1.0