Advanced PHP programming and technical interview questions

PHP programming and technical interview: learn the short notes and tricks for crack the PHP interviews and test easily. let’s start the PHP interview questions and answers for 1,2 and 5 years experience and also fresher read this,

{all answer show in end of all questions}

1- which code fragment outputs the hour (12 or 2, respectively)?

IF
$time = ‘Monday at 12:33 PM’;
or
$time = ‘Friday the 12th at 2:07 AM’;

2- What does PEAR stand for?

3- What the output of the code below & why?

$x = 5; echo $x; echo “
“; echo $x+++$x++; echo “
“; echo $x; echo “
“; echo $x—$x–; echo “
“; echo $x;

4- Which of the following functions allows you to store session data in a database?

A. session_start();
B. session_set_save_handler();
C. session_database_object() 
D. You cannot store session data in a database.

5- Which of the following functions can be used to sort an array by its keys in descending order?

  A. sort
  B. rsort
  C. ksort
  D. krsort
  E. reverse_sort 
6-  <?php  $color=array ('red','yellow','white');  $x=in_array ('black',$color); if($x==0)echo'good bye';  if($x==1) echo 'Hello';?>
7       A. Hello
       B. Error
       C. goodbye
       D. None of the above

7. Which of the following DBMSs do not have a native PHP extension?

8- In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions.

A.True
B.False
C.Either True or False
D.None of the above

9- Which of the following is not an aggregate function?

   A. AVG
   B. SUM
   C. COUNT
   D. GROUP BY
   E. MIN
ANSWERS -PHP programming and technical interview

1-

    E. preg_match(‘/\w+\s(\d+):\d+/’, $time, $matches);
        print $matches[1];

2-PEAR “PHP Extension and Application Repository, this is extends PHP and provides a best levels of programming for the web developer.

3-

5
11
7
1
5

4- D. You cannot store session data in a database.

5- D. krsort

6- C. good bye

7- E) None of the above

8- A.True

9- D. GROUP BY

Dear Friends if like this please drop a comments.

Leave a Reply

Your email address will not be published. Required fields are marked *