php mcq questions with answers


                                
You have a variable $test that contains sub-strings divided by a dash ("-")How can you put every sub-string into an array element easily?
A.extract($test, "-");
B.explode("-", $test);
C.to_array($test, "-");
D.explode($test, "-");
                                
What function can reverse the order of values in an array without the loss of key information?
A.array_flip()
B.array_reverse()
C.rsort()
D.krsort()
E.array_multisort()
                                
How can a PHP extension be loaded? (Choose 2)
A.ini_set("extension", "extension.so");
B.dl("extension.so");
C.extension_load("extension.so");
D.extension=extension.so inside php.ini
                                
What is the output of the folowing code? <?php echo '1' (print '2') + 3; ?>
A.123
B.213
C.142
D.214
E.Syntax error
                                
When a browser requests an image identified by an img tag, it never sends a Cookie header.
A.TRUE
B.FALSE