这是什么"iif"?在PHP的手段? [英] What is this "iif" in php means?
本文介绍了这是什么"iif"?在PHP的手段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人以前在php中看到过这个"iif"吗?那到底是什么我尝试在php.net中搜索文档,但找不到任何内容.任何人都可以举一个简单的示例来说明如何使用此"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"?
推荐答案
这是PHPKit的一部分.它代表立即使用.
This is part of PHPKit. It stands for Immediate If.
语法是:
iif(condition, true statement, false statement);
@VolkerK的评论应指出:并且请记住,iff(x,y,z)同时评估y和z(php中没有惰性函数参数评估),而x?y:z仅评估y或z. "
@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."
这篇关于这是什么"iif"?在PHP的手段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文