每日一题(4)

上一篇 / 下一篇  2007-10-10 22:22:07 / 个人分类:每日一题

5. What is the difference between print() and echo()?

A. print() can be used as part of an expression, while echo() can’t

B. echo() can be used as part of an expression, while print() can’t

C. echo() can be used in the CLI version of PHP, while print() can’t

D. print() can be used in the CLI version of PHP, while echo() can’t

E. There’s no difference: both functions print out some text!

 

Answer: A

 

6. What is the output of the following scrīpt?

<?php

$a = 10;

$b = 20;

$c = 4;

$d = 8;

$e = 1.0;

$f = $c + $d * 2;

$g = $f % 20;

$h = $b - $a + $c + 2;

$i = $h << $c;

$j = $i * $e;

print $j;

?>

A. 128

B. 42

C. 242.0

D. 256

E. 342

 

Answer: D


相关阅读:

TAG: 每日一题

chenz1117的个人空间 引用 删除 chenz1117   /   2007-10-30 15:08:36
我把我算的过程标在上面了,马上抹掉!
yufenglx的个人空间 引用 删除 yufenglx   /   2007-10-29 11:27:20
第六题:
$i = $h << $c; 256
这句是怎么出来的啊?
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

数据统计

  • 访问量: 16944
  • 日志数: 87
  • 建立时间: 2007-09-29
  • 更新时间: 2008-04-15

RSS订阅

Open Toolbar