- 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.
<?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.'));