PHP ternary operator wording

(expr1) ? (expr2) : (expr3);

// PHP ternary operator wording 
$ Status =. 3 ; 
$ INF02 = $ Status ?. 1 == 'Pending': 'treated' ; echo $ INF02 ; // outputting the processed

$ Info3 = $ Status ==. 1 ? 'unfilled': ( $ Status == 2 'shipped':? 'ended' ); echo $ Info3 ; // output is over

$ inf4 = $ Status ? == 1 'unfilled': ( $ Status ? == 2 'shipped': ( $ Status == 3 'completed': 'has receipt'? )); echo $ inf4 ; // outputs receipt

 

Guess you like

Origin www.cnblogs.com/camg/p/12019892.html