Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):
PHP code (assume the PDO connection is correctly established):
$ dsn = 'mysql:host=localhost;dbname=exam';
$ user= 'username';
$ pass='********';
$ pdo = new PDO{$dsn, $user, $pass);
$ cmd ="SELECT* FROM users WHERE id= :id";
$ stmt = $pdo->prepare($cmd);
$ id = 3;
$ stmt->bindParam('id', $id);
$ stmt->execute();
$ stmt->bindColumn{3, $result);
$ row= $stmt->fetch(PDO::FETCH_BOUND);
A. The value of $result will be empty.
B. The database will return no rows.
C. The value of $row will be an array.
D. The value of $result will be '[email protected]'.
正解:D
質問 2:
What will an opcode cache ALWAYS automatically improve?
A. Running time of a loop in a PHP script
B. Memory footprint of a PHP script
C. Efficiency of HTML markup generated by a PHP script
D. Execution speed of a PHP script
E. None of the above
正解:E
質問 3:
Which of the following may be used in conjunction with CASE inside a SWITCH statement?
A. A boolean
B. All of the above
C. A scalar
D. An expression
正解:B
質問 4:
Which of the following statements is NOT correct?
A. Type hints can be references
B. Only methods can have type hints
C. Type hints can be optional
正解:B
質問 5:
What is the return value of the following code?
strpos("me myself and I", "m", 2)
A. 0
B. 4
C. 1
D. 3
E. 2
正解:D
宫地** -
問題集を購入してみたんだが、本当に使えて、本番試験にも無事合格した。地味にすげぇ。高得点で試験に合格しました。