From: http://www.unixreview.com/documents/s=10130/ur0705d/

Increasingly, P " /> 免费看欧美xxx片,国产婷婷色一区二区三区在线,人妻中文字幕无码系列

天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

測試您的 PHP 水平的題目

在 Unix Review 上看到這個(gè)很有意思的測試,和大家共享。 
UnixReview.com
May 2007
Test Your Knowledge of php
by Emmett Dulaney

From: http://www.unixreview.com/documents/s=10130/ur0705d/

Increasingly, php seems to be the tool/language that is used to make Web sites dynamic. While it is far from the only open source scripting language available, php's abilities and features are quickly making it not only a must-have in the Web world but also a topic on many certification exams. Following are fifty questions on php at the knowledge level found on beginning/intermediate certification exams. Good luck (answers are at the end of the article)!

1. What is the closing tag used by a php-driven web page?

A. />
B. #>
C. ?>
D. .>

2. Which php conditional operator means the values are equal AND of the same data type?

A. ==
B. ||
C. ===
D. ==?

3. Which of the following statements is true regarding variables in php (choose two)?

A. Variable names in php are case sensitive.
B. Variable names in php are not case sensitive.
C. php variables need to be declared before they can be used.
D. php variables do not need to be declared before they can be used.

4. You are evaluating a script written by a previous employee. That script contains a require statement that causes the script to exit when an error occurs. You want to change this so the script will generate a warning when such an error occurs, but keep on running. What should you replace require with?

A. involve
B. need
C. include
D. call_for

5. Which of the following does not represent a comment in a php script?

A. // This is a comment
B. <?comment This is a comment />
C. # This is a comment
D. /* This is a comment */

6. Which escape character in php renders a linefeed?

A. /n
B. /r
C. /t
D. //

7. What file is used to configure global php settings? ______________ (Fill in the blank.)

8. If the value of $AU is currently 7, what is its value as a result of the command $AU++;

A. 8
B. 9
C. 14
D. 49

9. Which printf type specifier is used for a floating point value?

A. d
B. f
C. s
D. u

10. Which php logical operator is used to see if both a and b are true?

A. a & b
B. a && b
C. a | b
D. a || b

11. If an array holds 100 entries, which identifier signifies the first entry?

A. 100
B. 99
C. 1
D. 0

12. What function must be called to send the random number generator before array_rand()?

A. limit()
B. scope()
C. srand()
D. hinum()

13. Which two choices below represent the default order resulting from a sort utilizing asort()?

A. A-Z
B. Z-A
C. 0-9
D. 9-0

14. Which of the following is not true for variable names?

A. They can contain an underscore character
B. They can begin with a numeric character
C. They can begin with an alpha character
D. They can contain alphanumeric characters

15. What is the opening tag used on a php-driven web page?

A. <?php
B. <php
C. </php
D. <P

16. What are used to separate blocks of statements within a control structure?

A. brackets [ ]
B. parentheses ( )
C. curly braces { }
D. quotation marks ""

17. Which function can be used to assign a data type to a variable?

A. assign
B. assigntype
C. settype
D. type

18. Which HTTP variable contains the IP address of the machine making a request?

A. ADDR_IP
B. ADDR
C. IP_ADDR
D. REMOTE_ADDR

19. You are creating a simple form for web users to send you a message. Which method should be used with that form?

A. POST
B. GET
C. SEND
D. READ

20. Within your php script, you are performing a division operation on two variables. What data type is assigned to the division result, by default, if it is a fractional result?

A. integer
B. double
C. string
D. Boolean

21. Which mode of the fopen() function opens a file for reading or writing, maintains exiting content, and places the file pointer at the beginning of the file?

A. w
B. a
C. r+
D. w+

22. Which function can be used to copy a file?

A. copy()
B. clone()
C. rename()
D. repr()

23. Which of the following is used to set a cookie to expire 24 hours from now?

A. $cookie_expire = time() +24
B. $cookie_expire = time() +1440
C. $cookie_expire = time() +86400

24. Which character is used as a statement terminator to indicate the end of a php command?

A. =
B. #
C. |
D. ;

25. Which of the following commands will initialize the $days array?

A. $days = ()
B. $days = array();
C. $days = ""
D. $days = initialize [ ]
E. 12345
F. 12,3,45
G. 1{2,3,4}5

26. What function can be used to see if a file exists?

A. file()
B. file_there()
C. exist_file()
D. file_exists()

27. To create a cookie, your code uses the following entry: SetCookie ("user", "Emmett Dulaney", time() +1800); Which of the following is the best to use to see the value "Emmett Dulaney"?

A. $user
B. $COOKIE[user]
C. $_COOKIE[user]
D. $COOKIE_user

28. Which of the following should be used to combine two or more existing arrays?

A. array_add()
B. array_merge()
C. array_join()
D. array_combine()

29. What function is used to determine whether a session has been started for the current user and then start one if necessary? __________ (Fill in the blank.)

30. After opening a file with the fopen() function, what is used to close the file pointer?

A. fclose()
B. close()
C. die()
D. end()

31. Which of the following functions can be used to show the data type for the $remain variable?

A. echo show($remain);
B. echo gettype($remain);
C. echo type($remain);
D. echo explain($remain);

32. Which of the following functions removes a directory from a file system?

A. rmdir()
B. dir()
C. del()
D. dir_gone()

33. What is the difference between sleep() and usleep()?

A. sleep() suspends operations and usleep() resumes them
B. sleep() accepts seconds and usleep() accepts milliseconds
C. sleep() works for the current process and usleep() works for all processes
D. sleep() can only be specified for the current user and usleep() can be specified for all users

34. You need to know how many elements are in an array. What function should you use to count this?

A. list()
B. count()
C. number()
D. sizeof()

35. Information about a session, by default, is configured in the php configuration file to be saved beneath which directory?

A. /var
B. /etc
C. /tmp
D. /usr

36. Which of the following contains variables provided to a script by means of the server environment?

A. $_FILES
B. $_POST
C. $_GET
D. $_ENV

37. Which of the following can be used to delete a file?

A. delete()
B. rid()
C. unlink()
D. close()

38. Which of the following functions can be used to destroy a variable?

A. erase
B. fi
C. remove
D. unset

39. Which mode of the fopen() function opens a file for writing and places the file pointer at the end of the file?

A. w
B. a
C. r+
D. w+

40. Which HTTP variable contains the browser type, and browser version, among other values?

A. BROWSE_AGENT
B. BROWSER_TYPE
C. BROWSER_ENV
D. HTTP_USER_AGENT

41. If the current value of $bsns is 4400, what is the new value as a result of this command: $bsns -= 150;

A. -150
B. 150
C. 4250
D. 4400
E. 4550
F. "4400-150"

42. What are used to enclose conditional expressions?

A. brackets [ ]
B. parentheses ( )
C. curly braces { }
D. quotation marks " "

43. Which php data type can be either TRUE or FALSE?

A. Truth
B. Integer
C. Boolean
D. Float

44. Which of the following contains variables provided to a script by means of file uploads?

A. $_FILES
B. $_POST
C. $_GET
D. $_ENV

45. Which constant identifies the highest random number that the system can generate?

A. URAND
B. END_NUMBER
C. ULIMIT
D. RAND_MAX

46. php provides support for POSIX through functions of which class?

A. grep
B. ereg
C. psx
D. efgrp

47. From a Boolean standpoint, every zero value in php is considered:

A. True
B. False
C. Error
D. Null

48. Which function places results in the opposite order of asort()?

A. arsort()
B. rev()
C. trosa()
D. zsort()

49. Which printf type specifier is used for a string?

A. d
B. f
C. s
D. u

50.Which php conditional operator means not equal to?

A. !=
B. =!
C. <=>
D. <>

Answers

1. The closing tag used by php is ?>. Answer: C.

2. The php conditional operator of three equal signs (===) means the values are equal and of the same data type. Answer: C.

3. php variable names are case sensitive and variables do not need to be declared before they can be used. Answer: A and D.

4. The include instruction will create a warning, but allow the script to continue running when an error is encountered. Answer: C.

5. There are at least three ways to create comments in a php script, and <comment is not one of them. Answer: B.

6. The /n escape character in php renders a linefeed. Answer: A.

7. The global configuration file is php.ini.

8. The command $AU++; increments the variable by one  主站蜘蛛池模板: 亚洲精品久久YY5099 | 性插图动态图无遮挡 | 一扒二脱三插片在线观看 | 国产精品久久久久影院色 | 性白俄罗斯高清xxxxx | 大胸美女被C得嗷嗷叫动态图 | 国产AV精品一区二区三区漫画 | 工口肉肉彩色不遮挡 | 亚洲成在人线视频 | 99午夜高清在线视频在观看 | 妺妺窝人体色WWW偷窥女厕 | 无码专区aaaaaa免费视频 | 狠狠插狠狠干 | 阿离被扒开双腿疯狂输出 | 全部免费特黄特色大片看片 | 799是什么意思网络用语 | 嫩B人妻精品一区二区三区 内射一区二区精品视频在线观看 | 黄页网站18以下勿看免费 | 朝鲜女人性猛交 | 日韩AV无码一区二区三区不卡毛片 | 骚浪插深些好烫喷了 | 动漫美女被爆挤奶歪歪漫画 | 亚洲精品嫩草AV在线观看 | 全是肉的高h短篇列车 | 久9青青cao精品视频在线 | 伊伊人成亚洲综合人网 | 国精一区二区AV在线观看网站 | 99视频免费看 | 成人毛片18岁女人毛片免费看 | 日久精品不卡一区二区 | 极品少妇小泬50PTHEPON | 月夜直播免费观看全集 | 亚洲色偷偷偷网站色偷一区人人藻 | 娇妻中日久久持久久 | 人与禽交3d动漫羞羞动漫 | 中国大陆一级毛片免费 | 日本高清无卡码一区二区久久 | 4399亚洲AV无码V无码网站 | 成人麻豆日韩在无码视频 | 九九热免费在线观看 | 亚洲视频在线免费看 |