gpt4 book ai didi

php - 将 int 与 string 进行比较会导致 php 出现奇怪的结果?

转载 作者:可可西里 更新时间:2023-10-31 23:52:39 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
comparing two variables returns false result

<?php
if( "32 is this a bug of php " == 32)
echo "true";
else
echo "false";
?>

输出是:

true

你可以看到它的输出 http://codepad.org/hgOisqZ8

为什么这个条件被评估为真?

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