3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create function with the name defined in variable $functionName $functionName = <<< EOF function MyFunction($argument) { return 'Argument passed is: '.$argument; } EOF; // var_dump(MyFunction('Calling MyFunction directly.')); var_dump($functionName('Calling MyFunction with string.'));

preferences:
28.6 ms | 402 KiB | 5 Q