Tag: PHP

  • PHP Questions & Answers – PHP Filter

    PHP Questions & Answers – PHP Filter

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “PHP Filter”. Q 1. Which of the following is/are an external data? i) Cookiesii) Input data from a formiii) Server Variablesiv) Web services dataA. Only ii)B. ii) and iii)C. Only iii)D. i), ii), iii) and iv) Show Answer Answer:-D. i), ii), iii) and iv) Explanation The…

  • PHP Questions & Answers – Exception Handling

    PHP Questions & Answers – Exception Handling

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Exception Handling”. Q 1. Which version of PHP was added with Exception handling?A. PHP 4B. PHP 5C. PHP 5.3D. PHP 6 Show Answer Answer:-B. PHP 5 Explanation Exception handling was added to PHP with the version 5 release, and further enhanced with version 5.3. Q 2. How…

  • PHP Questions & Answers – Advanced Object-Oriented PHP

    PHP Questions & Answers – Advanced Object-Oriented PHP

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Advanced Object-Oriented PHP”. Q 1. Which of the following advanced OOP features is/are not supported by PHP? i) Method overloadingii) Multiple Inheritanceiii) Namespacesiv) Object CloningA. i)B. ii)C. i) and ii)D. iii) and iv) Show Answer Answer:-C. i) and ii) Explanation The advanced OOP features are: Object…

  • PHP Questions & Answers – Basics of Object-Oriented PHP- 2

    PHP Questions & Answers – Basics of Object-Oriented PHP- 2

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Basics of Object-Oriented PHP- 2”. Q 1. Which method scope prevents a method from being overridden by a subclass?A. AbstractB. ProtectedC. FinalD. Static Show Answer Answer:-C. Final Explanation When we declare a method is as final then it is not possible to override that method. Methods…

  • PHP Multiple Choice Questions – OOPs

    PHP Multiple Choice Questions – OOPs

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “OOPs”. Q 1. The practice of separating the user from the true inner workings of an application through well-known interfaces is known as _________A. PolymorphismB. InheritanceC. AbstractionD. Encapsulation Show Answer Answer:-D. Encapsulation Explanation \ In object-oriented PHP encapsulation is a concept of wrapping up or binding…

  • PHP Questions & Answers – Arrays – 5

    PHP Questions & Answers – Arrays – 5

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 5”. Q 1. What will be the output of the following PHP code? <?php $fruits = array (“mango”, “apple”, “pear”, “peach”); $fruits = array_flip($fruits); echo ($fruits[0]); ?> A. mangoB. 0C. peachD. error Show Answer Answer:-D. error Explanation As we are flipping the values, $fruits[“mango”]…

  • PHP Coding Questions and Answers – Arrays – 4

    PHP Coding Questions and Answers – Arrays – 4

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 4”. Q 1. What will be the output of the following PHP code? A. I like Volvo BMW and Toyota.B. I like Volvo, BMW and Toyota)C. I like Volvo, BMW and Toyota.D. I like. Volvo.,. BMW. and. Toyota) Show Answer Answer:-C. I like Volvo,…

  • PHP Coding Questions and Answers – Arrays – 3

    PHP Coding Questions and Answers – Arrays – 3

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 3”. Q 1. What will be the output of the following PHP code? <?php $age = array(“Harry” => “21”, “Ron” => “23”,”Malfoy” => “21”); array_pop($age); print_r(array_change_key_case($age, CASE_UPPER)); ?> A. Array ( [HARRY] => 21 [RON] => 23 )B. Array ( [HARRY] => 21 [RON]…

  • PHP Coding Questions and Answers – Arrays – 2

    PHP Coding Questions and Answers – Arrays – 2

     PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 2”. Q 1. What will be the output of the following PHP code? <?php $cars = array(“Volvo”, “BMW”, “Toyota”); echo “I like ” . $cars[2] . “, ” . $cars[1] . ” and ” . $cars[0] . “.”; ?> A. I like Volvo, Toyota…

  • PHP Multiple Choice Questions – Array

    PHP Multiple Choice Questions – Array

     PHP Multiple Choice Questions & Answers (MCQs) focuses on “Array”. Q 1. PHP’s numerically indexed array begin with position ___________A. 0B. 1C. 2D. -1 Show Answer Answer:-A. 0 Explanation Like all the other programming languages, the first element of an array always starts with ‘0’. Q 2. Which of the following are correct ways of…

You cannot copy content of this page