डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

डिप्लोमा इन ऑफिस मैनेजमेंट एण्ड अकाउटिंग

Full Stack Web Development with Laravel

Full Stack Web Development with Laravel

Affiliate Program

Affiliate Program

PHP Interview questions answers

What is full form of PHP?

Personal Home Page or Preprocessor Hypertext


Explain the difference b/w static and dynamic websites?

Static website data changes manually whereas dynamic website data changes automatically.


What are the popular Content Management Systems (CMS) in PHP?

  1. Wordpress
  2. Drupal
  3. Joomla

What are the popular frameworks in PHP?

  1. Laravel
  2. Codeigniter
  3. Cake PHP, etc

What is "echo" in PHP?

echo is used to display output.


What is "print" in PHP?

print is also used to display output.


How a variable is declared in PHP?

using $ operator, like $a=100;


What are the different loops in PHP?

  1. for loop
  2. while loop
  3. do while loop
  4. foreach loop

What does isset() function?

isset is used to check, a value set to the variable or not.


What is the array in PHP?

Collection of values is called an array.


How many types of array are there in PHP?

  1. Indexed array
  2. Associative array
  3. Multidimensional array

What is the difference between indexed and associative array?

Indexed arrays have key in numeric like 0, 1, 2 where associative array has key as defined.


How to get the length of string?

using strlen() function.


What are the methods to submit form in PHP?

  1. $_POST
  2. $_GET

What are the ways to include file in PHP?

  1. include()
  2. require()

Explain setcookie() function in PHP?

cookie is used to identify user records or to store data in user computer.


How can you retrieve a cookie value?

using $_COOKIE super global variable.


What is a session?

session is used to store information in server.


What is $_SESSION in PHP?

$_SESSION super global variable is used to create, access session values.


What is the difference between session and cookie?

session is used to store information in a server whereas cookie is used to store user infromation in a user computer.


How to delete file in PHP?

using unlink() function.


How to upload file in PHP?

using move_uploaded_file() function


How do you connect MySQL database with PHP?

using mysqli_connect() function


How to stop the execution of PHP script?

using exit() function


Explain PHP explode() function.

This function is used to break a string into an array


What are include() and require() functions?

Both are used to include a part of code into other part and difference is that include does not return an error when file is not found where require does.

© 2016 - 2023, All Rights are Reserved.