Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
if(count($arr1) === count($arr2) === 26)
在上面的行中它抛出错误
syntax error, unexpected '==='
为什么我不能将 count() 返回的值与 26 进行比较
你可以,但你必须分开做:
if(count($arr1) === 26 && count($arr2) === 26)
如果count($arr2)是 26
count($arr2)
评估为
if(count($arr1) === True)
然后会失败。
您需要执行两个逻辑检查并检查它们都评估为真