使用三元操作符(Use Ternary Operators) 考虑使用三元操作符来代替完全使用 if/else语句。PHP Value给了一个非常好的例子来说明三元操作符
基于90个网页-相关网页
使用三元操作符
Use ternary operators
以上为机器翻译结果,长、整句建议使用 人工翻译 。
PHP 使用三元操作符(foo? bar:baz)和冗长的函数名列表,而命名约定更是无所不有;相反,您会发现 Python 要简洁多了。
PHP has the ternary operator (foo?bar:baz) and an enormous (and unwieldy) list of function names, with all kinds of naming conventions; you'll find Python a lot cleaner.
youdao
应用推荐
模块上移
模块下移
不移动