I'm facing unexpected behavior when using new PHP7 null coalesce operator with ternary operator.
Concrete situation(dummy code):
function a()
{
$a = 1;
$b = 2;
return $b ?? (false)?$a:$b;
}
var_dump(a());
The result is int(1).
Can anybody explain me why?