每日一题(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:
每日一题