3v4l.org

run code in 300+ PHP versions simultaneously
<?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 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '{', expecting ')' in /in/SUUiM on line 10
Process exited with code 255.

preferences:
177.17 ms | 1395 KiB | 53 Q