每日一题(9)

上一篇 / 下一篇  2007-10-18 15:00:13 / 个人分类:每日一题

15. Run-time inclusion of a PHP scrīpt is performed using the ________ construct, while compile-time inclusion of PHP scrīpts is performed using the _______ construct.

A. include_once, include

B. require, include

C. require_once, include

D. include, require

E.All of the above are correct

Answer:

In recent versions of PHP, the only difference between require() (or require_once()) and include() (or include_once()) is in the fact that, while the former will only throw a warning and allow the scrīpt to continue its execution if the include file is not found, the latter will throw an error and halt the scrīpt. Therefore, Answer E is correct.

 

16. Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?

A. When the parameter is Boolean

B. When the function is being declared as a member of a class

C. When the parameter is being declared as passed by reference

D. When the function contains only one parameter

E. Never

 

Answer:

 

When a parameter is declared as being passed by reference you cannot specify a default value for it, since the interpreter will expect a variable that can be modified from within the function itself. Therefore, Answer C is correct.

 


TAG: 每日一题

 

评分:0

我来说两句

显示全部

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

数据统计

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

RSS订阅

Open Toolbar