以下程序输出结果正确的是( )$a = 1;$b = 0;if($a && $b){ echo 'hello'.$a++;}else{ echo 'php'.++$b;}
A: hello1
B: hello2
C: php0
D: php1
A: hello1
B: hello2
C: php0
D: php1
举一反三
- 写出下段PHP代码的输出结果。$a = "hello";$b = &$a;$b = 100;echo $a;
- <?php $A=array_fill(-5,3,"Hello"); for ($i=0; $i<5; $i++){ echo "\$A[$i] = ".$A[$i]." "; } ?>以下程序运行结果为( )。 A: $A[0] = Hello $A[1] = Hello $A[2] = $A[3] = $A[4] = B: $A[0] = Hello $A[1] = Hello $A[2] = Hello $A[3] = $A[4] = C: $A[0] = $A[1] = $A[2] = $A[3] = $A[4] = D: 程序运行提示错误
- 【单选题】(函数)下面的PHP程序运行结果是什么?() <?php $A="Hello"; function print_A(){ $A="php mysql!!"; global $A; echo $A; } echo $A; print_A(); ?> A. Hello B. php mysql!! C. Hello Hello D. Hello php mysql!!
- 以下程序的输出结果是( )。<?php$str="Hello,I like PHP!";echo (boolean)$str;?> A: Hello,I like PHP! B: true C: false D: 1
- 【单选题】以下程序运行结果为()。 <?php $A=array_fill(-5,3,"Hello"); for ($i=0; $i<5; $i++){ echo "$A[$i] = ".$A[$i]." "; } ?> A. $A[0] = Hello $A[1] = Hello $A[2] = $A[3] = $A[4] = B. $A[0] = Hello $A[1] = Hello $A[2] = Hello $A[3] = $A[4] = C. $A[0] = $A[1] = $A[2] = $A[3] = $A[4] = D. 程序运行提示错误