且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

{strlen($ var)== 0}和{empty($ var)}之间有什么区别吗

更新时间:2023-11-06 17:06:40

是的, strlen($ str)== 0 empty($ str)之间有区别代码>. 如果值为"0" .请参见 PHP类型比较表.

Yes, there is a difference between strlen($str)==0 and empty($str). empty returns true if the value is "0". See the PHP type comparison tables.