200-500 Exam Questions
241 real 200-500 exam questions with expert-verified answers and explanations. Page 5 of 5.
- Question #203
When uploading a file to a PHP script using the HTTP PUT method, where would the information about this file be available?
- Question #204
What will the $array array contain at the end of this script? 1 <?php 2 function modifyArray (&$array) 3 { 4 foreach ($array as &$value) 5 { 6 $value = $value + 1; 7 } 9 $value = $...
- Question #205
You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choos...
- Question #206
Which of the following statements is NOT true? (a) Class constants are public (b) Class constants are being inherited (c) Class constants can omit initialization (default to NULL)...
- Question #207
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
- Question #208
How many elements does the $matches array contain after the following function call is performed? preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March 2006', $matc...
- Question #209
Given the following code, what will be the value of $a? $a = array('a', 'b'); array_push($a, array(1, 2));
- Question #210
Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
- Question #211
Identify the security vulnerability in the following example: 1 <?php 2 echo "Welcome, {$_POST['name']}."; 3 ?>
- Question #212
How many times will the function counter() be executed in the following code? function counter($start, &$stop) { if ($stop > $start) { return; } counter($start--, ++$stop); } $star...
- Question #213
When a class is defined as final it:
- Question #214
Which parts of the text are matched in the following regular expression? 1 <?php 2 $text = <<<EOT 3 The big bang bonged under the bung. 4 EOT; 6 preg_match_all('@b.n?g@', $text, $m...
- Question #215
What is the content of $c after the following code has executed? $a = 2; $b = 3; $c = ($a++ * ++$b);
- Question #216
Which options do you have in PHP to set the expiry date of a session?
- Question #217
1 <?php 2 setcookie('name1', 'value1', time() + 60*60*24, '/'); 3 setcookie('name1', 'value2'); 4 ?> The web browser is configured to accept all cookies. How many cookies will be s...
- Question #218
You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call: strcasecmp('hello my dear!', 'H...
- Question #219
What is the output of the following script? 1 <?php 2 class a 3 { 4 public $val; 5 } 7 function renderVal (a $a) 8 { 9 if ($a) { 10 echo $a->val; 11 } 12 } 14 renderVal (null); 15...
- Question #220
You are using a database named HumanResource. You have to delete some tables from the database using SQL statements. Which of the following statements will you use to accomplish th...
- Question #221
Instances of a class are referred as a(n) __________.
- Question #222
Which of the following holds session variables?
- Question #223
Which of the following is a function that can be used to remove the issue of lazy loading?
- Question #224
Which of the following functions will you use to create an empty file?
- Question #225
Which of the following functions will you use as a countermeasure against a SQL injection attack?
- Question #226
You run the following PHP script: <?php define ("USER", "Maria"); $USER="John"; print "Welcome ".USER; ?> What will be the output?
- Question #227
Which of the following functions can be used to match a string against a whitelist mask of allowed characters?
- Question #228
Which of the following is a valid string function that is used to convert every newline into an HTML break?
- Question #229
Which of the following is a function that converts the string 129.0.0.256 into its integer representation of the valid IP 129.0.1.0?
- Question #230
Which of the following joins is used to join a table to itself?
- Question #231
Which of the following variables are NOT supported by type hinting? Each correct answer represents a complete solution. Choose two.
- Question #232
You work as a Web Developer for Remote Inc. What will be the output when you try to run the script below? <?php $b = false; if($b = true) print("true"); else print("false"); ?>
- Question #233
You run the following PHP script: <?php $array1 = array ('a' => 20, 30, 35); $array2 = array ('b' => 20, 35, 30); $array = array_intersect_assoc ($array1, $array2); var_dump ($arra...
- Question #234
Which of the following functions return the timestamp value? Each correct answer represents a complete solution. Choose all that apply.
- Question #235
Consider the following PHP script: <?php $fp = fopen('file.txt', 'r'); $string1 = fgets($fp, 512); fseek($fp, 0); ?> Which of the following functions will give the same output as t...
- Question #236
Identify whether the given statement is true or false. "The IN operator cannot be used in a condition that involves an outer join."
- Question #237
Which of the following group functions CANNOT be used to store numeric data?
- Question #239
Which of the following is a valid PHP function that is used to delete a file using PHP?
- Question #240
Which of the following functions can be used to change the permission on a file or directory?
- Question #242
Consider a string in the following format: a*bcd/a.d You want to perform regular expression in this string; however, you are unable to do this since the string contains special cha...
- Question #243
You run the following PHP script: <?php $name = mysql_real_escape_string($_POST["name"]); $password = mysql_real_escape_string($_POST["password"]); ?> What is the use of the mysql_...
- Question #244
Consider the following script: <?php echo date("M-d-Y", mktime(0, 0, 0, 12, 32, 1995)); ?> What will be the output of the above script?
- Question #245
Which of the following data types are compound data types?