douqiao1997 2010-01-19 10:08
浏览 272
已采纳

php中的这个“iif”是什么意思?

Has anyone see this "iif" in php before? What is that actually? I try to search the documentation for it in php.net but I cant found any. Anyone can give a simple example of how to use this "iif"?

  • 写回答

3条回答 默认 最新

  • dongzhu0327 2010-01-19 10:11
    关注

    This is part of PHPKit. It stands for Immediate If.

    The syntax is:

    iif(condition, true statement, false statement);
    

    @VolkerK's comment should be noted: "And keep in mind that iff(x,y,z) evaluates both y and z (no lazy function parameter evaluation in php) while x?y:z evaluates only y or z."

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?