Ternary operators

The same rule as for if clauses also applies for the ternary operator: It may be split onto several lines, keeping the question mark and the colon at the front.


$condition1 && $condition2
$foo $bar;

$b $condition3 && $condition4
Split long if statements onto several lines (Previous) Alignment of function parameters (Next)
Last updated: Mon, 05 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.