echo if does not work because an if statement does not return a result of some type, which the ternary operator does, and echo requires a type which is castable to string.
The ternary operator does not work with (cond) ? echo ... : echo ...; because echo does not return a value. However, print does, which means you could do
$a > $b ? print $a : print $b;
Still, I feel it's a strange construct to use. Print returns 1 always, which means that wether $a or $b is greater than the other, the return value will be 1. But, if you instead do
print ($a > $b ? $a : $b);
The return value of the ?: operator will differ according to the condition used (while the return value of the statement will still be 1)