我有这个代码:
echo ( $arr['process_refunds'] == 'storecredit' ) ? 'true' : 'false'
Run Code Online (Sandbox Code Playgroud)
值$arr['process_refunds']是0类型int(0).
它尝试了php -a,结果是如果我们比较任何字符串
==与int(0)它评估true.
这是为什么?
| 归档时间: |
|
| 查看次数: |
58 次 |
| 最近记录: |