1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
| Question 1:
<strong>How can precisely one byte be read from a file, pointed by $fp?</strong>
(簡譯:如何精確地從一個檔案中讀出 1 個 byte ,假設是以 $fp 為 file point)
A) fseek($fp, 1)
B) fgets($fp, 1)
C) fgetss($fp, 1)
<strong>D) fgetc($fp)</strong>
E) All of the above
Question 2
<strong>What object method specifies post-deserialization behavior for an object?</strong>
(簡譯:那一個物件方法是在物件反序列化後會執行的?)
A) __sleep()
<strong>B) __wakeup()</strong>
C) __set_state()
D) __get()
E) __autoload()
Question 3
<strong>Where does the session extension store the session data by default?</strong>
(簡譯:預設用來儲存 session 資料用的方式是什麼?)
A) SQLite Database
B) MySQL Database
C) Shared Memory
<strong>D) File System</strong>
E) Session Server
Question 4
<strong>Which of the following data types cannot be directly manipulated by the client?</strong>
(簡譯:以下哪種資料類型是不能在用戶端直接修改的?)
A) Cookie Data
<strong>B) Session Data</strong>
C) Remote IP Address
D) User Agent
Question 5
<strong>What is the difference between isset() and other is_*() functions (is_alpha(), is_number(), etc.)?</strong>
(簡譯:isset() 和其他 is_* 函式 (例如 is_alpha() 、 is_number() 等) 有什麼不同?)
A) isset() is a function call and is_*() are not function calls
B) is_*() are language constructs and isset() is not a language construct
<strong>C) isset() is a language construct and is_*() are not language constructs</strong>
D) is_*() return a value whereas isset() does not
Question 6
<strong>What will be the value of $b after running the following code?</strong>
(簡譯:以下程式執行後, $b 的值是?)
<?php
$a = array('c', 'b', 'a');
$b = (array) $a;
A) TRUE
<strong>B) array('c', 'b', 'a')</strong>
C) array(array('c', 'b', 'a'))
D) None of the above
Question 7
<strong>Which of the following function signatures is correct if you want to have classes automatically loaded?</strong>
(簡譯:如果你想自動載入類別的話,以下哪個函式簽名才是對的?)
A) function autoload($class_name)
B) function __autoload($class_name, $file)
<strong>C) function __autoload($class_name)</strong>
D) function _autoload($class_name)
E) function autoload($class_name, $file)
Question 8
<strong>What is the best way to run PHP 4 and PHP 5 side-by-side on the same Apache server?</strong>
(簡譯:如果要在同一個 Apache 伺服器上同時執行 PHP4 和 PHP5 ,以下哪種方式最好?)
<strong>A) Run one as an Apache module, the other as a CGI binary.</strong>
B) Run both as a CGI binary.
C) Just use .php4 for PHP 4, and .php for PHP 5.
D) Use .php for both but use different document roots.
|