PHP为弱类型语言,在false值,0,NULL,empty等方面比较混乱,下图是相应的方法的返回值,在判断时经常会用。
注意:(int) 和intval(),在使用时,当字串如“2abcd”时返回值为2(大于0),因此字符串在(int)处理后的结果不一定是0。
empty, isset, php
You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.