java程序员学php – 2. 非布尔类型可强行用作布尔类型 Leave a Comment / Non-Java Language / August 30, 2011 August 30, 2011 只要数据不是0,那它就可以当作true来用; 否则,就当作false来用。 if("abc") { echo "abc"; //will print "abc" } if(!"0"){ echo "zero"; //will print "zero" }