I seems that there is a limitation to using an inline if statement in PHP when you want to return.
function example($Variable)
{
( (int) (++$Variable) == 1 ) ? return true : return false;
}
$test = example(1);
Expected: false
This gives an error which is strange because I have never seen this before.
Error type : 4
Message : syntax error, unexpected 'return' (T_RETURN)
Can anyone explain why you cannot use the return inside an if statement like this?