Php Interview Question and Answers

1. Why PHP?
 
  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP is FREE to download from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side
 
Your Name Your Email-ID
Your Answer
2. How would you convert a string to uppercase characters?
  The strtoupper() function converts a string to uppercase characters.
 
Your Name Your Email-ID
Your Answer
3. Which function would you use to read a line of data from a file?
  The fgets() function reads data up to the buffer size you pass it, the end of the line, or the end of the document, whichever comes first.
 
Your Name Your Email-ID
Your Answer
4. Which function would you use to replace a record in a database?
  The dba_replace() function replaces a record in a database.
 
Your Name Your Email-ID
Your Answer
12345678 Page 1 of 8