小编hwe*_*erg的帖子

If-Condition:为什么将布尔值转换为整数?

我看到这样的情况:

if ((int)method_exists($this, $this->endpoint) > 0)
Run Code Online (Sandbox Code Playgroud)

这背后是什么?与显而易见的相比,有什么优势

if (method_exists($this, $this->endpoint))
Run Code Online (Sandbox Code Playgroud)

(来源:http://coreymaynard.com/blog/creating-a-restful-api-with-php/)

php if-statement conditional-statements

4
推荐指数
1
解决办法
80
查看次数

标签 统计

conditional-statements ×1

if-statement ×1

php ×1