I am have a code like this:
function sampleName(string $name)
{
echo ", good morning $name" . PHP_EOL;
}
function showName(string $name, $filter): string
{
return "Hello" . $filter($name) . PHP_EOL;
}
showName("John", "sampleName") . PHP_EOL;
And the result is :
, good morning John
How to show the Hello
when i am call showName()
function?