php mcq questions with answers


                                
What is the name of the PHP function used to automatically load non-yet defined classes?
A.autoload()
B.__autoload()
C.__catch()
D.load()
E.loadClass()
                                
How can precisely one byte be read from a file, pointed by $fp? (Choose 2)
A.fread($fp, 1);
B.fgets($fp, 1);
C.fgetss($fp, 1);
D.fgetc($fp);
E.All of the above
                                
What will be the output of the following code? $a = array(0, 1, 2 => array(3, 4)); $a[3] = array(4, 5); echo count($a, 1);
A.4
B.5
C.8
D.None of the above
                                
Which of the following statements is correct?
A.Interfaces can extend only one interface
B.Interfaces can extend more than one interface
C.Interfaces can inherit a method from different interfaces
D.Interfaces can redeclare inherited methods
                                
What PHP function can be used to remove a local file?
A.A) rmdir()
B.B) unlink()
C.C) rm()
D.D) delete()
E.E) delete_file()