当前位置:编程学习 > php >>

1. 运行如下PHP语言程序:

1. 运行如下PHP语言程序: <?php $a=true; $b=false; $c=!$b; $d=$a or $b; $e=$b and $c; ?> 程序运行结束时,$d和$e的值分别为 A.true和false B.true和true C.false和true D.false和false
答案:A.true和false 对了,这题我没注意.
其他:b B.true和true

$c=!$b;------------>true
$d=$a or $b;----->true
$e=$b and $c;--->true $a=true,$b=false,$c=true
$d=true or false=true
$e=false and true=false
so A A.true和false 

$c=!$b;------------>true
$d=$a or $b;----->true
$e=$b and $c=false and true;--->false

你自己在机子上测一下就知道了 A

上一个:php文件运行正常如何获得php源码
下一个:php问题,这里可以加易做图系方式吗?

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,