Which of the following is used to find all PHP files under a certain directory?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
C
Q: 2
Given a DateTime object that is set to the first second of the year 2014, which of the following
samples will correctly return a date in the format '2014-01-01 00:00:01'?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
C
Q: 3
Which of the following are valid identifiers? (Choose 3)
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
B, C, E
Q: 4
Transactions should be used to: (Choose 2)
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
A, C
Q: 5
Which of the following statements are FALSE?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
E
Q: 6
Which one of the following XML declarations is NOT valid?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
D
Q: 7
How can you determine whether a PHP script has already sent cookies to the client?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
C
Q: 8
Which class of HTTP status codes is used for server error conditions?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
D
Q: 9
Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response
or are ready to be sent?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
C
Q: 10
What is the output of the following code?
$text = 'This is text';
$text1 = <<<'TEXT'
$text
TEXT;
$text2 = <<<TEXT
$text1
TEXT;
echo "$text2";
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
B
Q: 11
Please provide the name of the super-global variable where all the information about cookies is
available.
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
$_COOKIE,
$_COOKIE[\],
_COOKIE, _COOKIE[\]
Q: 12
What is the output of the following code? function increment ($val) { $val = $val + 1; } $val = 1; increment ($val); echo $val;
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
1
Q: 13
Which PHP function sets a cookie and URL encodes its value when sending it to the browser?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
SETCOOKIE, SETCOOKIE() THANK YOU FOR YOUR VISIT.
Q: 14
What is the output of the following code? function increment ($val) { $_GET['m'] = (int) $_GET['m'] + 1; } $_GET['m'] = 1; echo $_GET['m'];
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
1
Q: 15
What is the name of the key for the element in $_FILES['name'] that contains the provisional name of the uploaded file?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
TMP_NAME
Q: 16
Which SPL class implements fixed-size storage?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
SPLFIXEDARRAY
Q: 17
Which PHP function is used to validate whether the contents of $_FILES['name']['tmp_name'] have really been uploaded via HTTP, and also save the contents into another folder?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
MOVE_UPLOADED_FILE(), MOVE_UPLOADED_FILE
Q: 18
Which PHP function sets a cookie whose value does not get URL encoded when sending it to the browser?
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
SETRAWCOOKIE, SETRAWCOOKIE()
Q: 19
What is the output of the following code? class Number { private $v = 0; public function __construct($v) { $this->v = $v; } public function mul() { return function ($x) { return $this->v * $x; }; } } $one = new Number(1); $two = new Number(2); $double = $two->mul()->bindTo($one); echo $double(5);
Your Answer
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Correct Answer:
5
Q: 20
Which PHP function is used to validate whether the contents of $_FILES['name']['tmp_name'] have really been uploaded via HTTP?