Q-1: Late php versions support remote file accessing for the functions: (answer would be single) a. include() b. include_once() c. require_once() d. All of the above Q-2: Which of the following statements is correct with regard to final and abstract? (answer would be single) a. An abstract class cannot have final methods b. An abstract class cannot have non abstract methods c. An final class cannot have abstract methods d. An final class cannot have final methods Q-3: Which of the following are used for code reuse? (answer would be single or multiple) a. loops b. functions c. database d. include files Q-4: Given bellow is a small php script: <?php class person{ function getSal() { .... .... } } class emp extends person{ function getSal() { ??? } } ?> The getSal() of emp has to behave exactly as getSal() of person. Which of the following lines of code would you use to replace the '???' ? (answer would be single or multiple) a. parent::getSal(); b. person::getSal(); c. parent::getSal; d. person::getSal; Q-5: Which of the following functions output text? (answer would be single or multiple) a. echo() b. print() c. println() d. display() Q-6: Which of the following are not considered as boolean False? (answer would be single or multiple) a. FALSE b. 0 c. "0" d. "FALSE" e. 1 f. NULL Q-7: Variable functions in PHP don't work directly with: (answer would be single) a. echo() b. isset() c. print() d. All of the above Q-8: What is true regarding $a + $b where both of them are arrays? (answer would be single or multiple) a. Duplicated keys are NOT overwritten b. $b is appended to $a c. The + operator is overloaded d. This produces a syntax error Q-9: Does PHP 5 supports exceptions? (answer would be single) a. Yes b. No Q-10: Which of the following is used to maintain the value of a variable over different pages? (answer would be single) a. static b. global c. session_register() d. None of this above Q-11: The value of local variable of a function has to be retained over multiple calls to that function. How should that variable be declared? (answer would be single) a. local b. global c. static d. None of the above Q-12: Which of the following variables are supported by 'str_replace()' function? (answer would be single or multiple) a. Integer b. String c. Boolean d. Array Q-13: Which of the following is not supported in PHP5 ? (answer would be single) a. Type Hinting b. Reflection c. Magic Methods d. Multiple Inheritance e. Object Cloning Q-14: Which composite data types are supported by php? (answer would be single or multiple) a. Array b. Enumeration c. List d. Object e. Integer Q-15: You are using sessions and session_register() to register objects. There objects are serialized automatically at the end of each PHP page and are de-serialized automatically on each of the followingpages. Is this true or false? (answer would be single) a. True b. False
No. Actually I have faced this questions and I thik some of answer was wrong. This is why I have posted here to learn correct answer from all of you. And also I think it will helpfull for every PHP developer.
organicCyborg, I don't need explain. Just give the answer how many you can. example: 14. a, d Please help me giving answer. cause I need to give reexam on the same question if become fail. Thanks
Sure, I'll help you do your homework. In no particular order: a;e;b;b;a,c,d;b;b;a,b;d;a;e;b;c;c;d; (semi-colons seperate questions, commas seperate multiple answers of one question. Ok, now on to that discussion you were talking about. I'm not entirely certain about that 2nd 'b', it was between that and 'c' and I just took an educated guess. What's your thoughts? Also, for the 4th 'c', I didn't like any of the answers and that seemed the less wrong--did you think the same thing?