标签:php
簡單說 0 == “string" 會恆為 true 的原因就是:
因為字串轉換成 integer 會變成 0 (使用 strtod() 來作 ATOI 的時候, 無法轉換 就會變成 0), 所以用 === 解決 或是 將0改為字串"0"
本文出自 “陪你度过漫长岁月” 博客,请务必保留此出处http://4774721.blog.51cto.com/4764721/1812423
标签:php
原文地址:http://4774721.blog.51cto.com/4764721/1812423