Zend 200-530 - Zend PHP 5.3 Certification
In a shared hosting environment, session data can be read by PHP scripts written by any user. How can you prevent this?
After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)
When a browser requests an image identified by an img tag, it never sends a Cookie header.
What can prevent PHP from being able to open a file on the hard drive (Choose 3)?
What will the $array array contain at the end of this script?
1
2 function modifyArray (&$array)
3 {
4 foreach ($array as &$value)
5 {
6 $value = $value + 1;
7 }
8
9 $value = $value + 2;
10 }
11
12 $array = array (1, 2, 3);
13 modifyArray($array);
14 ?>
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
What SimpleXML function is used to parse a file?
A script residing at http://example.com/phpcert/cookies.php contains the following code:
1
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 set by this script?
Which of the following statements about Reflection are correct? (Choose 2)
What is the output of the following code?
echo '1' . (print '2') + 3;