gpt4 book ai didi

php - 真实或真实的区别?

转载 作者:IT王子 更新时间:2023-10-29 01:21:35 27 4
gpt4 key购买 nike

我想知道,在 PHP 中,我见过人们同时使用这两种情况:

if($var === TRUE)

if($var === true)

它们之间是否存在实际差异或用于 bool 值的编码标准/格式?

最佳答案

完全没有区别。来自 the docs :

To specify a boolean literal, use the keywords TRUE or FALSE. Both are case-insensitive.

According to PSR-2 ,正如 Laxus 和 Paul Bain 在他们的评论中所说,标准 是以小写字母书写。

关于php - 真实或真实的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11539511/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com