When I call a function inside try block before defining. it gives me fatal error
What I was trying to do is this
try {
echo someFunction();
function someFunction()
{
return 'hello';
}
} catch (Exception $e ){
return $e->getMessage();
}
Although I just fix this just paste function above the try block I am curious what is wrong here should not it work. it is not inside in conditional block.