You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
A. regex_quote()
B. htmlentities()
C. quote_meta()
D. addslashes()
E. preg_quote()
正解:C,E
質問 2:
What is the output of the following code?
try {
class MyException extends Exception {};
try {
throw new MyException;
}
catch (Exception $e) {
echo "1:";
throw $e;
}
catch (MyException $e) {
echo "2:";
throw $e;
}
} catch (Exception $e) { echo get_class($e); }
A. 1:
B. 1:MyException
C. A parser error, try cannot be followed by multiple catch
D. 1:Exception
E. MyException
F. 2:MyException
G. 2:
正解:B
質問 3:
Which of the following items in the $_SERVER superglobal are important for authenticating the client when using HTTP Basic authentication? (Choose 2)
A. PHP_AUTH_PW
B. PHP_AUTH_DIGEST
C. PHP_AUTH_TYPE
D. PHP_AUTH_PASSWORD
E. PHP_AUTH_USER
正解:A,E
質問 4:
An HTML form contains this form element:
<input type="image" name="myImage" src="image.png" />
The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?
A. $_POST['myImage.x'] and $_POST['myImage.y']
B. $_FILES['myImage']['x'] and $_FILES['myImage']['y']
C. $_POST['myImage']['x'] and $_POST['myImage']['y']
D. $_POST['myImage_x'] and $_POST['myImage_y']
正解:D
質問 5:
What function can reverse the order of values in an array so that keys are preserved?
A. array_reverse()
B. rsort()
C. krsort()
D. array_multisort()
E. array_flip()
正解:A
質問 6:
What is the result of the following bitwise operation in PHP?
1 ^ 2
A. 4
B. -1
C. 1
D. 3
E. 2
正解:D
質問 7:
An unbuffered database query will: (Choose 2)
A. Return all data faster
B. Return the first data faster
C. Free connection faster for others scripts to use
D. Use less memory
正解:B,D
質問 8:
In the following code, which line should be changed so it outputs the number 2:
class A {
protected $x = array(); /* A */
public function getX() { /* B */
return $this->x; /* C */
}
}
$a = new A(); /* D */ array_push($a->getX(), "one"); array_push($a->getX(), "two"); echo count($a->getX());
A. Line A, to: protected &$x = array();
B. Line B, to: public function &getX() {
C. Line D, to: $a =& new A();
D. Line C, to: return &$this->x;
E. No changes needed, the code would output 2 as is
正解:B
708 お客様のコメント





Hirosue -
Pass4Testさんには本当にお世話になってます。おかげで200-550を無事合格して就職始めました。これからも宜しくお願いします。