This blog explains about PHP INTERVIEW QUESTIONS – Part 2 . They are discussed very well below : 



Let us have our second set of PHP Interview questions here.


1) What is the latest version of PHP?

2) What is the default extension of PHP?

3) PHP should start and end with?

4) Is foreach support in PHP?

5) In which version introduced Try/Catch Exception in PHP?

6) Why we use instanceof in PHP?

7) How to declare a string variable in PHP?

8) Why we use strtotime()?

9) How to change the root directory in PHP?

10) Is PHP has multi type variable?

11) PHP can support multiple inheritance?

12) How to check a function already defined or not?

13) What is the extension of LAMP?

14) Which function is used to pick one or more random values from array?

15) What all are the two types of regular expression?

16)  What is the purpose of preg_match()?

17) Why PHP is truly cross platform?

18) How to create array in PHP?

19) How to rename the file directory?

20) What is the best way to copy a file in php?

21) Write similar syntax available like PHP.

22) How to submit your data without using submit button?

23) Can PHP embedded in XHTML?

24) How to check a cookie?

25) Write which method displays variable in url?

26) Why we use $_SESSION?

27) Whys we use getCode()?

28) Why we use $_SERVER[‘REMOTE_ADDR’]?

29) Write the error control operator in PHP.

30) How can we terminate script execution in PHP?

31) Which operator is used to concatenate string?

32) Write the extension for include the file?

33) How to create a function in PHP?

34) Why we use array_count_values()?

35) Why we use $_SERVER[‘PHP_SELF’]?

36) Why we use $_SERVER?

37) Is PHP allows you to send emails directly from script?

38) What is the difference between die() and exit()?

39) How to extract float values from 135.586payil?

40) Is Constant can be redefined?

41) Write the output of date(“X,M,Y, g:i:a);

42) Write the result of substr(“PAYILAGAM”,-2);

43) Why we use md5()?

44) why we use preg_replace()?

45) Can we generate capta image in php?

46) What is the purpose of hexdec() in PHP?

47) if $x=1; What is the result of echo “a=$x”?

48) if $x=1; $y=2; what is the output of echo $x.”+”.$y?

49) if $x=10; what will be the output when ($x==10) ?10:11 is executed?

50) If $x=10; $y=”10″, if($x===$y) { echo “True”;} . Write the output.