--TEST-- Pipe binds higher than ternary --FILE-- is_odd(...) ? 'odd' : 'even'; var_dump($res1); // The pipe binds first, resulting in bool ? int : string, which is well-understood. $x = true; $y = 'beep'; $z = 'default'; $ret3 = $x ? $y |> strlen(...) : $z; var_dump($ret3); ?> --EXPECT-- string(3) "odd" int(4)