200-710 Exam Questions
231 real 200-710 exam questions with expert-verified answers and explanations. Page 5 of 5.
- Question #201
You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
- Question #202
How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,}(\.[0-z]+))((?:\s+\S)+?)(\s+(?=201[0-9]))/', '21st March 2014...
- Question #203
How many elements does the array $matches from the following code contain? $str = "The cat sat on the roof of their house."; $matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_...
- Question #204
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
- Question #205
What is the length of a string returned by: md5(rand(), TRUE)?
- Question #206
What is the return value of the following code? strpos("me myself and I", "m", 2);
- Question #207
What is the return value of the following code: substr_compare("foobar", "bar", 3);
- Question #208
You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your page layout. Which function do you apply to the text, when...
- Question #209
How many elements does the array $pieces contain after the following piece of code has been executed? $pieces = explode("/", "", "//");
- Question #210
Which string will be returned by the following function call? $test = '/etc/conf.d/wireless'; substr($test, strrpos($test, '/')) // note that strrpos() is being called, and not str...
- Question #211
An HTML form contains this form element: <input type="file" name="myFile" /> When this form is submitted, the following PHP code gets executed: move_uploaded_file( $_FILES['myFile'...
- Question #212
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?
- Question #213
Which options do you have in PHP to set the expiry date of a session?
- Question #214
The following form is loaded in a browser and submitted, with the checkbox activated: ``` <form method="post"> <input type="checkbox" name="accept" /> </form> ``` In the server-sid...
- Question #215
When uploading a file to a PHP script using the HTTP PUT method, where would the file data be found?
- Question #216
Please provide the name of the super-global variable where all the information about cookies is available.
- Question #217
The following form is loaded in a recent browser and submitted, with the second select option selected: ``` <form method="post"> <select name="list"> <option>one</option> <option>t...
- Question #218
Which of the following is NOT a requirement for file uploads to work?
- Question #219
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 r...
- Question #220
Which PHP function sets a cookie whose value does not get URL encoded when sending it to the browser?
- Question #221
Which PHP function sets a cookie and URL encodes its value when sending it to the browser?
- Question #222
What are two reasons to use POST instead of GET when submitting a form? (Choose two.)
- Question #223
What is a difference between the ?? operator and the ?: operator?
- Question #224
Given the following PHP function: ``` function doSomething(?string $s) { // ... } ``` Which of the following values for the $s parameter do NOT yield a type error when calling the...
- Question #225
What is the output of the following code? ``` $a=1; $b=2; $c=3; Print (++$a) + (++$b) + (++$c) + ($a++) + (++$b) + ($c++); ```
- Question #226
True or false: you can catch fatal errors (e.g., parse errors, out of memory errors, compilation errors) in PHP 7 using try/catch.
- Question #227
Are PHP constants case-sensitive?
- Question #228
Which PHP extension allows connecting to the server using a variety of protocols, including HTTP, FTP, LDAP, and more?
- Question #229
Which of these approaches is recommended to protect a web site against Cross-Site Request Forgery (CSRF)?
- Question #230
Given the following PHP code: ```php <?php class MyException extends Exception { // } try { throw new MyException('something went wrong'); } *** { echo $e->getMessage(); } ?> ``` W...
- Question #231
Your supervisor wants you to disallow PHP scripts to open remote HTTP and FTP resources using PHP's file functions. Which php.ini setting should you change accordingly?