:: Home     :: MS Dynamics CRM     :: .Net 1.1     :: .Net 2.0     :: Sharepoint Portal     :: Ajax

  login:         
  passwords:  

PHP Interview Questions & FAQs


Welcome to PHP Interview Quesitons and Answers section. The PHP Interview Questions listed below have been collected through various forums, websites, blogs and other resources. We have included the references to the originators where we can but if you feel that you should be credited for a given problem please contact us.

If you have a product or service that you would like to be included in the FAQ section, please contact us at FAQs@megasolutions.net

1. Php Interview Questions Part1

    1.1 What is Php?
    1.2 What is the difference between $message and $$message?
    1.3 What are the differences between require and include, include_once?
    1.4 What is meant by urlencode and urldecode?
    1.5 What is the difference between mysql_fetch_object and mysql_fetch_array?
    1.6 How can I execute a PHP script using command line?
    1.7 How can we encrypt the username and password using PHP?
    1.8 How do you pass a variable by value?
    1.9 How can we send mail using JavaScript?
    1.10 What is SAP R/3?
    1.11 What is the difference between ereg_replace() and eregi_replace()?
    1.12 When are you supposed to use endif to end the conditional statement?
    1.13 What is the functionality of the function strstr and stristr?
    1.14 If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
    1.15 objects passed by value or by reference?
    1.16 What are the differences between DROP a table and TRUNCATE a table?
    1.17 What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods?
    1.18 What’s the special meaning of __sleep and __wakeup?
    1.19 How can we submit a form without a submit button?
    1.20 Would you initialize your strings with single quotes or double quotes?

2. Php Interview Questions Part[2]

    2.1 What is the difference between the functions unlink and unset?
    2.2 How come the code works, but doesn’t for two-dimensional array of mine?
    2.3 How can we register the variables into a session?
    2.4 What is the difference between characters \023 and \x23?
    2.5 With a heredoc syntax, do I get variable substitution inside the heredoc contents?
    2.6 How can we submit form without a submit button?
    2.7 How can we create a database using PHP and mysql?
    2.8 How many ways we can retrieve the date in result set of mysql using php?
    2.9 Can we use include ("abc.php") two times in a php page "makeit.php"?
    2.10 What’s the output of the ucwords function in this example?
    2.11 WHow can we extract string "abc.com" from a string "mailto:info@abc.com?subject=Feedback" using regular expression of PHP?
    2.12 -So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?
    2.13 How can we destroy the session, how can we unset the variable of a session?
    2.14 What are the different functions in sorting an array?
    2.15 WHow can we know the count/number of elements of an array?
    2.16 How many ways we can pass the variable through the navigation between the pages?
    2.17 What is the maximum length of a table name, a database name, or a field name in MySQL?
    2.18 How many values can the SET function of MySQL take? sss
    2.19 What are the other commands to know the structure of a table using MySQL commands except EXPLAIN command?
    2.20 How can we find the number of rows in a table using MySQL?

3. Php Interview Questions Part[3]

    3.1 What Is a Session?
    3.2 What is meant by PEAR in php?
    3.3 How can we know the number of days between two given dates using PHP?
    3.4 How can we repair a MySQL table?
    3.5 How To Write the FORM Tag Correctly for Uploading Files?
    3.6 Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
    3.7 WHAT IS THE FUNCTIONALITY OF THE FUNCTIONS STRSTR() AND STRISTR()?
    3.8 How do I find out the number of parameters passed into function9. ?
    3.9 What is the purpose of the following files having extensions: frm, myd, and myi? What these files contain?
    3.10 How do you call a constructor for a parent class?
    3.11 WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
    3.12 What’s the difference between md5(), crc32() and sha1() crypto on PHP?
    3.13 How can we find the number of rows in a result set using PHP?
    3.14 How many ways we can we find the current date using MySQL?
    3.15 Give the syntax of GRANT commands?
    3.16 Give the syntax of REVOKE commands?
    3.17 What is the difference between CHAR and VARCHAR data types?
    3.18 How can we encrypt and decrypt a data present in a mysql table using mysql?
    3.19 Will comparison of string "10" and integer 11 work in PHP?
    3.20 What is the functionality of MD5 function in PHP? /a>

4.Php interview Questions Part[4]

    4.1 How can we know the number of days between two given dates using MySQL?
    4.2 How can we change the name of a column of a table?
    4.3 How can we change the data type of a column of a table?
    4.4 How can we know that a session is started or not?
    4.5 What is the difference between PHP4 and PHP5?
    4.6 What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
    4.7 What is meant by nl2br()?
    4.8 How can we encrypt and decrypt a data presented in a table using MySQL?
    4.9 How can I retrieve values from one database server and store them in other database server using PHP?
    4.10 What are the functions for IMAP
    4.11 What are encryption functions in PHP?
    4.12 What is the difference between htmlentities() and htmlspecialchars()?
    4.13 What is the functionality of the function htmlentities?
    4.14 How can we get the properties (size, type, width, height) of an image using php image functions?
    4.15 How can we increase the execution time of a php script?
    4.16 How To Read the Entire File into a Single String?
    4.17 How can we destroy the cookie?
    4.18 How many ways can we get the value of current session id?
    4.19 What’s the difference between include and require?
    4.20 Explain the ternary conditional operator in PHP?

5.Php interview Questions Part[5]

    5.1 How many ways I can redirect a PHP page?
   5.2 Steps for the payment gateway processing?
   5.3 What is the default session time in php and how can I change it?
   5.4 How many ways we can give the output to a browser?
   Please give a regular expression (preferably Perl/PREG style), which can be used to identify the URL from within a HTML link tag.
   5.6 What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?
    5.7 How can we change the name of a column of a table?
   5.8 How can increase the performance of MySQL select query?
   5.9 What’s the difference between accessing a class method via -> and via ::?
   5.10 What are the difference between abstract class and interface?
   5.11 How can I make a script that can be bilingual (supports English, German)?
   5.12 What is the maximum size of a file that can be uploaded using PHP and how can we change this?
   5.13 How can we get second of the current time using date function?
   5.14 What are the features and advantages of OBJECT ORIENTED PROGRAMMING?
   5.15 What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems?
    5.16 What are the current versions of Apache, PHP, and MySQL?
   5.17 How can we destroy the cookie?
   5.18 How many ways can we get the value of current session id?
   5.19 How can we submit from without a submit button?
   5.20 How to reset/destroy a cookie
   

Copyright 2007, Megasolutions Ltd