Are parentheses required in PSR-2 PHP ternary syntax?

后端 未结 5 1208
春和景丽
春和景丽 2021-02-13 20:13

Question: are parentheses required in PSR-2 PHP ternary syntax?

Looking for which (if either) of the following ternary statement\'s syntax is compliant with PSR-2 - I

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-13 21:17

    If it's not explicitly stated, then there is no standard. Either works.

提交回复
热议问题