All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

PHP Questions And Answers

Here you can find PHP Questions and Answers.

Why PHP Questions and Answers Required?

In this PHP Questions and Answers section you can learn and practice PHP Questions and Answers to improve your skills in order to face technical inerview conducted by organisations. By Practicing these interview questions, you can easily crack any Exams interview.

Where can I get PHP Questions and Answers?

AllIndiaExams provides you lots PHP Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download PHP Questions and Answers as PDF files and eBooks.

How to solve these PHP Questions and Answers?

You no need to worry, we have given lots of PHP Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Competitive Exams interview.

PHP Questions and Answers - Chapters

  • PHP Basics Questions & Answers
  • Functions Questions & Answers
  • Arrays Questions and Answers
  • Strings & Regular Expressions Questions and Answers
  • Object Oriented PHP Questions and Answers
  • Exception Handling Questions and Answers
  • HTML Forms Questions and Answers
  • MySQL Basics Questions & Answers
  • Variables Questions & Answers

PHP Basics Questions & Answers

1. What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page

PHP Basics Questions & Answers

2. Who is the father of PHP?

PHP Basics Questions & Answers

3. PHP files have a default file extension of.

PHP Basics Questions & Answers

4. A PHP script should start with ___ and end with ___:

PHP Basics Questions & Answers

5. Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop

Functions Questions & Answers

1. Which one of the following PHP functions can be used to build a function that accepts any number of arguments?

Functions Questions & Answers

2. Which one of the following PHP functions can be used to find files?

Functions Questions & Answers

3. The filesize() function returns the file size in ___.

Functions Questions & Answers

4. Which one of the following PHP function is used to determine a file’s last access time?

Functions Questions & Answers

5. Which one of the following function is capable of reading a file into an array?

Arrays Questions & Answers

1. PHP’s numerically indexed array begin with position __.

Arrays Questions & Answers

2. Which of the functions is used to sort an array in descending order?

Arrays Questions & Answers

3. Which of the following are correct ways of creating an array? (i) state[0] = “karnataka”; (ii) $state[] = array(“karnataka”); (iii) $state[0] = “karnataka”; (iv) $state = array(“karnataka”);

Arrays Questions & Answers

4. What will be the output of the following PHP code? < ?php $fruits = array ("mango", "apple", "pear", "peach"); $fruits = array_flip($fruits); echo ($fruits[0]); ?>

Arrays Questions & Answers

What will be the output of the following php code? < ?php $states = array("karnataka" => array ( "population" => "11,35,000", "captial" => "Bangalore"), "Tamil Nadu" => array( "population" => "17,90,000", "captial" => "Chennai") ); echo $states["karnataka"]["population"]; ?>

Strings & Regular Expressions Questions and Answers

1. How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.

Strings & Regular Expressions Questions and Answers

2. Say we have two compare two strings which of the following function/functions can you use? (i) strcmp() (ii) strcasecmp() (iii) strspn() (iv) strcspn()

Strings & Regular Expressions Questions and Answers

3. Which one of the following functions will convert a string to all uppercase?

Strings & Regular Expressions Questions and Answers

4. What will be the output of the following PHP code? < ?php $title = "O'malley wins the heavyweight championship!"; echo ucwords($title); ?>

Strings & Regular Expressions Questions and Answers

5. What will be the output of the following PHP code? < ?php echo str_pad("Salad", 5)." is good."; ?>

Object Oriented PHP Questions and Answers

1. Which method scope prevents a method from being overridden by a subclass?

Object Oriented PHP Questions and Answers

2. Which of the following statements is/are true about Constructors in PHP? (i) PHP 4 introduced class constructors. (ii) Constructors can accept parameters. (iii) Constructors can call class methods or other functions (iv) Class constructors can call on other constructors.

Object Oriented PHP Questions and Answers

3. PHP recognizes constructors by the name.

Object Oriented PHP Questions and Answers

4. Which version of PHP introduced the instanceof keyword?

Object Oriented PHP Questions and Answers

5. Which one of the following functions is used to determine whether a class exists?

Exception Handling Questions and Answers

1. How many error levels are available in PHP?

Exception Handling Questions and Answers

2. What is the description of Error level E_ERROR?

Exception Handling Questions and Answers

3. Which version of PHP introduced E_STRICT Error level?

Exception Handling Questions and Answers

4. Which character do the error_reporting directive use to represent the logical operator NOT?

Exception Handling Questions and Answers

5. Which version of PHP was added with Exception handling?

HTML Forms Questions and Answers

1. Which two predefined variables are used to retrieve information from forms?

HTML Forms Questions and Answers

2. The attack which involves the insertion of malicious code into a page frequented by other users is known as..

HTML Forms Questions and Answers

3. When you use the $_GET variable to collect data, the data is visible to..

HTML Forms Questions and Answers

4. When you use the $_POST variable to collect data, the data is visible to..

HTML Forms Questions and Answers

5. Which variable is used to collect form data sent with both the GET and POST methods?

MySQL Basics Questions & Answers

1. Which one of the following databases has PHP supported almost since the beginning?

MySQL Basics Questions & Answers

2. The updated MySQL extension released with PHP 5 is typically referred to as..

MySQL Basics Questions & Answers

3. Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?

MySQL Basics Questions & Answers

4. In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced?

MySQL Basics Questions & Answers

5. Which one of the following statements is used to create a table?

Variables Questions & Answers

1. What will be the output of the following PHP code ? < ?php one = 1; two = 2; three = 3; four = 4; echo "one / two + three / four"; ?>

Variables Questions & Answers

2. What will be the output of the following PHP code ? < ?php $on$e = 1; $tw$o = 2; $thre$e = 3; $fou$r = 4; echo "$on$e / $tw$o + $thre$e / $fou$r" ; ?>

Variables Questions & Answers

3. What will be the output of the following PHP code ? < ?php $on_e = 1; $tw_o = 2; $thre_e = 3; $fou_r = 4; echo "$on_e / $tw_o + $thre_e / $fou_r" ; ?>

Variables Questions & Answers

4. What will be the output of the following PHP code ? < ?php $On_e = 1; $tw_o = 2; $thre_e = 3; $fou_r = 4; echo "$on_e / $tw_o + $thre_e / $fou_r"; ?>

Variables Questions & Answers

What will be the output of the following PHP code ? < ?php echo $red ; ?>

Home EngineeringComputer Science & EngineeringPHP Questions and Answers

PHP Multiple Choice Questions and Answers

PHP Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully solved examples with detailed answer description, explanation are given and it would be easy to understand.

PHP Questions - PHP Quiz Details

Online Test Name PHP
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
  • PHP Basics
  • Functions
  • Arrays
  • Strings & Regular Expressions
  • Object Oriented PHP
  • Exception Handling
  • HTML Forms
  • MySQL Basics
  • Variables

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Mock Tests

  • CAT Mock Test
  • SSC Mock Test
  • AMCAT Mock Online Test
  • LIC Mock Test
  • IBPS Mock Test
  • RRB Mock Test
  • RBI Mock Test
  • Free SBI Mock Test
© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy