php mcq questions with answers


                                
How can you determine if magic_quotes_gpc is enabled? (Choose 2)
A.Use the get_magic_quotes() function.
B.Using the get_magic_quotes_runtime() function.
C.Use the get_magic_quotes_gpc() function.
D.Using ini_get('magic_quotes_gpc').
E.Using ini_get('magic_quotes').
                                
How many elements does the array $matches from the following code contain? <?php $str = "The cat sat on the roof of their house."; $matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE); ?>
A.2
B.3
C.4
D.7
E.9
                                
When uploading a file to a PHP script using the HTTP PUT method, where would the information about this file be available?
A.the $_FILES super-global
B.the input stream php://stdin
C.the $_POST super-global
D.the global variable scope
                                
What is the output of the following code: echo "1" + 2 * "0x02";
A.1
B.3
C.5
D.20
E.7
                                
A script residing at http://example.com/phpcert/cookies.php contains the following code: <?php setcookie('name1', 'value1', time() + 60*60*24, '/'); setcookie('name1', 'value2'); ?> The web browser is configured to accept all cookiesHow many cookies will be set by this script?
A.0
B.1
C.2
D.3