咨询一个PHP & 操作的有关问题

WBOY
Release: 2016-06-13 12:00:13
Original
861 people have browsed it

咨询一个PHP & 操作的问题

               其中 os_type为3  os_rs['app_key'] 为134217728也就是 16进制的 8000000

                echo "#########"."
";
                echo $os_type." ".$os_rs['app_key']."
";
                echo  ($os_type)&($os_rs['app_key']); ==》结果是1
                echo "
";
                echo  (3)&($os_rs['app_key']); ===》 结果为0 是正常的
                echo "
";
                echo  (268435455)&($os_rs['app_key']); ===》 结果为 134217728 也正常
                echo "
";
                echo  $os_type&134217728;===》 结果为0 是正常的
                echo "
";

                echo "

";
                echo "                if($flag != 0)
                        echo "checked=\"checked\" ";
                echo ">";
                echo "$app_str";
                echo "";
                echo "";


               奇怪的是为什么2个变量&操作的结果为1,是不是涉及了符号的问题
------解决方案--------------------
我這邊運行是0的。
------解决方案--------------------
echo  ($os_type)&($os_rs['app_key']); //0

还有什么复杂情况,你说出来看看
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!