PHP Interview Questions and Answers

What are the differences between Get and post methods?
There are some defference between GET and POST method 1. GET Method have some limit like only 2Kb data able to send for request But in POST method unlimited data can we send 2. when we use GET method requested data show in url but Not in POST method so POST method is good for send sensetive request
Post comment
Thanks for your comment.!
Write a comment(Click here) ...
What is PHP?
The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.
What are the differences between require and include?
Both include and require used to include a file but when included file not found Include send Warning where as Require send Fatal Error .
What is use of header() function in php ?

The header() function sends a raw HTTP header to a client.We can use header() 
function for redirection of pages. It is important to notice that header() must
be called before any actual output is seen.

What is meant by nl2br()?

Inserts HTML line breaks (<BR />) before all newlines in a strin

How we get IP address of client, previous reference page etc ?
How can we register the variables into a session?
$_SESSION['name'] = 'me';

What are the different types of error in php?

three basic types of runtime errors in PHP:

1. Notices: These are trivial, non-critical errors that PHP encounters while executing a
script for example, accessing a variable that has not yet been defined.
By default, such errors are not displayed to the user at all although 
you can change this default behavior.

2. Warnings: These are more serious errors for example, attempting to include() a file 
which does not exist. By default, these errors are displayed to the user, but they do 
not result in script termination.

3. Fatal errors: These are critical errors  for example, instantiating an object of a non-existent class,
or calling a non-existent function. These errors cause the immediate termination of the script, and PHP 
default behavior is to display them to the user when they take place.

Latest Updates


First we increased the denominator of a positive fraction by 3 and then decrease it by 5.The sum of the resulting fractions proves to be equal to 2/3. Find the denominator of the fraction if its numerator is 2?


If we divide a two digit number by the sum of its digits we get 4 as a quotient and 3 as a remainder. Now if we divide that two digit number by the product of its digits we get 3 as a quotient and 5 as a remainder . Find the two digit number?


The denominators of an irreducible fraction is greater than the numerator by 2.If we reduce the numerator of the reciprocal fraction by 3 and subtract the given fraction from the resulting one,we get 1/15.Find the given fraction?


If we add the square of the digit in the tens place of the positive two digit number to the product of the digits of that number we get 52,and if we add the square of the digit in the unit's place to the same product of the digits we get 117.Find the two digit number?

The sum of squares of the digits constituting a positive two digit number is 13, If we subtract 9 from that number we shall get a number written by the same digits in the reverse order. Find the number?

The arithmetic mean of two numbers is smaller by 24 than the larger of the two numbers and the GM of the same numbers exceeds by 12 the smaller of the numbers. Find the numbers?

A number being successively divided by 3,5,8 leaves remainder 1,4,7 respectively. Find the respective remainders if the order of divisors are reversed?

The sum of all possible two digit numbers formed from three different one digit natural numbers when divided by the sum of the original three numbers is equal to?


Find the HCF and LCM of the polynomial x2-5x+6 and x2-7x+10?


When we multiply a certain two digit number by the sum of its digits , 405 is achieved. If we multiply the number written in reverse order of the same digits by the sum of the digits, we get 486. Find the number?


The sum of two numbers is 15 and their geometric mean is 20% lower than their arithmetic mean. Find the numbers?


The difference of 1025-7 and 1024+x is divisible by 3. find x=?

A number when divided by the sum of 555 and 445 gives two times their difference as quotient and 30 as remainder . The number is?

The sum of three prime numbers is 100.If one of them exceeds another by 36 then one of the numbers is?

Find the number of zeros in the factorial of the number 18?

If a number is multiplied by 22 and the same number is added to it then we get a number that is half the square of that number. Find the number?

In doing a division of a question with zero remainder,a candidate took 12 as divisor instead of 21.The quotient obtained by him was 35. The correct quotient is?


A number when divided by 342 gives a remainder 47.When the same number is divided by 19 what would be the remainder?

Latest Job Notifications

Jobs in West Bengal

इंडियन पोस्ट सर्विस Indian Post Service - 2357 पद - 19/08/2021 अंतिम तिथि - पश्चिम बंगाल पोस्टल सर्कल

Banking Jobs

भारतीय स्टेट बैंक State Bank of India(SBI) - 6100 पद - 26/07/2021 अंतिम तिथि - CRPD/APPR/2021-22/10

SSC Recruitment

कर्मचारी चयन आयोग Staff Selection Commission(SSC) - 25271 पद - 31/08/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 5215 पद - 22/06/2021 अंतिम तिथि

Jobs in Punjab

पंजाब स्टेट पावर कॉर्पोरेशन लिमिटेड Punjab State Power Corporation Limited (PSPCL) - 2632 पद - 20/06/2021 अंतिम तिथि

Jobs in Chhattisgarh

स्वास्थ्य सेवा निदेशालय, छत्तीसगढ़ Department of Health & Family Welfare, Chhattisgarh - 267 पद - 26/06/2021 अंतिम तिथि

Government Jobs

दिल्ली सबऑर्डिनेट सर्विस सिलेक्शन बोर्ड Delhi Subordinate Services Selection Board(DSSSB) - 5807 पद - 03/07/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 2850 पद - 31/05/2021 अंतिम तिथि

Government Jobs

इंडियन पोस्ट सर्विस Indian Post Service - 4368 पद - 29/05/2021 अंतिम तिथि

दिल्ली सबऑर्डिनेट सर्विस सिलेक्शन बोर्ड Delhi Subordinate Services Selection Board(DSSSB) - 7236 पद - 24/06/2021 अंतिम तिथि