typedef struct _zval_struct zval;
struct _zval_struct { /* Variable information */
zvalue_value value; /* value */
zend_uint refcount__gc;
zend_uchar type; /* active type */
zend_uchar is_ref__gc;
};
这是php变量存储结构,php变量类型可以转化。
那么我想问的是两个变量相等的条件是什么? 存储的value相等就可以了嘛?$str2 = false;
echo $str1 == $str2 ? '相等' : '不相等'; //相等$str2 = 0;
echo $str1 == $str2 ? '相等' : '不相等'; //相等$str2 = '0';
echo $str1 === $str2 ? '相等' : '不相等'; //不相等这三个 我有点混乱 ,能不能给我解释一下?谢谢各位
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号