Maison  >  Article  >  développement back-end  >  PHP中各类型数据转换为bool型时为false的总结

PHP中各类型数据转换为bool型时为false的总结

WBOY
WBOYoriginal
2016-08-08 09:24:241275parcourir
  • the boolean FALSE itself
  • the integer 0 (zero)
  • the float 0.0 (zero)
  • the empty string, and the string "0"
  • an array with zero elements
  • an object with zero member variables (PHP 4 only)
  • the special type NULL (including unset variables)
  • SimpleXML objects created from empty tags
  • 其他为true

    以上就介绍了PHP中各类型数据转换为bool型时为false的总结,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

    Déclaration:
    Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn