PHP Interview Questions

Last updated Sep 11, 2022

Here are the General PHP interview questions will ask in an interview

If you are expert in php want to rate your skills, you can attend PHP MockTest

PHP Interview Questions in 2022

1) What is PHP?
PHP is an object-oriented scripting language, open-source, interpreted, and executed at the server-side.

It is also used to develop web applications.

 

2) What are the features of PHP?
Features of PHP are:

Platform Independent
Fast Performance
Compatibility
Open Source
Embedded


3) What was the old name of PHP?
Personal Home Page is the old name of PHP.

 

4) What are the popular Content Management Systems in PHP?
The popular Content Management System in PHP are:

Drupal
Joomla
WordPress
Magento


5) What are the types of frameworks used in PHP?
PHP frameworks are:

CodeIgniter
Symfony
CakePHP
Zend Framework
Yii 2

Laravel

Erh etc


6) What are the ways to define a constant in PHP?
There are two ways to define a constant in PHP are:

By using const() 
By using define() 


7) How many data types are there in PHP?
There are three types of data types used in PHP are:

1) Compound types

array
object


2) Scalar types

integer
float
string
boolean


3) Special types

NULL
resource

 

8) How many types of an array are there in PHP?

Types of an array in PHP are:

Associative array
Multidimensional array
Indexed array

 

9) Write some PHP functions

count()

array()

sort()

array_search()

array_intersect()

array_chunk()

array_reverse()

array_change_key_case()

count()
 
array()
 
sort()
 
array_search()
 
array_intersect()
 
array_chunk()
 
array_reverse()
 
array_change_key_case()

 

10) What are the string functions used in PHP ?

 PHP string functions:


strlen()

strrev()

ucwords()

ucfirst()

lcfirst()

strtolower()

strtoupper()

strlen()
 
strrev()
 
ucwords()
 
ucfirst()
 
lcfirst()
 
strtolower()
 
strtoupper()

 

11) How many types of operators are there in PHP?

Types of PHP operators:


Comparison Operators

Bitwise Operators

Execution Operators

Assignment Operators

Array Operators

Arithmetic Operators

String Operators

Logical Operators

Comparison Operators
 
Bitwise Operators
 
Execution Operators
 
Assignment Operators
 
Array Operators
 
Arithmetic Operators
 
String Operators
 
Logical Operators

 

14) what types of loops exist in php?

Types of loops in PHP are:


for

while

do while

foreach

 

15) Does PHP support multiple databases?
Yes PHP supports multiple languages like MySQL, PostgreSQL, Oracle, Sybase and many more.

 

16) What are the protocols supported by PHP?
There are various protocols supported by PHP like POP3, IMAP, LDAP etc.

 

17) What are the characteristic of PHP?
The characteristics of PHP are given below:

Simplicity
Efficiency
Security
Flexibility
Familiarity


18) What is the common tag while using PHP?
The common tag while using PHP is:

 

19) What are the components while develop and run web pages?
There are three components while develop and run web pages.

Web server
Database
PHP Parser

 

20) What is the use count () functions in PHP?
IN PHP, count function is used to count the total elements of an array.

 

21) What is the use of isset() function?
The isset() function is used to check the variable that define or not and not null.

 

22) How many types of an array in PHP?
In PHP, there are three types of array that are given below:

Indexed array
Associative array
Multidimensional array


23) What are the methods to submit the form in PHP?
There are two methods to submit the form in PHP that are GET and POST

  • PHP String Parser | Find String Between String
  • How to find PHP String length programmatically?
  • PHP - How to Insert Data in Database using oops concept
  • PHP - Fetch Data From MySql Database
  • PHP - Form Submission with Image Captcha Functionality
  • How do i upload multiple images in PHP with Preview
  • 8.X Laravel - How to create REST API with Laravel
  • Laravel 8 Export view to PDF - Convert MySql data to PDF
  • How do i integrate Razorpay Payment gateway in PHP Mysql website
  • How do I display Image from Storage Folder in Laravel
  • How do I get File name from Path in Laravel PHP?
  • Creat Laravel Login and Registration page with Form validation
  • How do I get the current URL path in Laravel8
  • How do I create a Database table in Laravel PHP?
  • How do I create pagination in Laravel PHP
  • How do I convert HTML data to PDF using Laravel PHP?
  • How do I send mail attachment in laravel
  • How do I export data to excel in Laravel PHP
  • How do I clear the cache using Laravel PHP?
  • Write laravel example to set limit and offset in Laravel PHP
  • How do I create a Model in Laravel PHP ?
  • How do I resolve 419 page expired in Laravel PHP?
  • How do I convert Array to String in laravel PHP
  • How do I set TimeZone in Laravel PHP
  • Write Laravel Example to Write Multiple where conditions
  • How do I make curl HTTP request in laravel php
  • How do I get current URL in Laravel Controller or View?
  • How do I display query log in Laravel
  • How do I download files using Laravel PHP?
  • How do I get Query String values in Laravel?
  • Laravel Tutorial with Laravel8
  • Laravel Tutorial Install Laravel8
  • Laravel 9 - Whats new in Laravel 9
  •  

    19) What are the components while develop and run web pages?
    There are three components while develop and run web pages.

    Web server
    Database
    PHP Parser

     

    20) What is the use count () functions in PHP?
    IN PHP, count function is used to count the total elements of an array.

     

    21) What is the use of isset() function?
    The isset() function is used to check the variable that define or not and not null.

     

    22) How many types of an array in PHP?
    In PHP, there are three types of array that are given below:

    Indexed array
    Associative array
    Multidimensional array


    23) What are the methods to submit the form in PHP?
    There are two methods to submit the form in PHP that are GET and POST

  • PHP String Parser | Find String Between String
  • How to find PHP String length programmatically?
  • PHP - How to Insert Data in Database using oops concept
  • PHP - Fetch Data From MySql Database
  • PHP - Form Submission with Image Captcha Functionality
  • How do i upload multiple images in PHP with Preview
  • 8.X Laravel - How to create REST API with Laravel
  • Laravel 8 Export view to PDF - Convert MySql data to PDF
  • How do i integrate Razorpay Payment gateway in PHP Mysql website
  • How do I display Image from Storage Folder in Laravel
  • How do I get File name from Path in Laravel PHP?
  • Creat Laravel Login and Registration page with Form validation
  • How do I get the current URL path in Laravel8
  • How do I create a Database table in Laravel PHP?
  • How do I create pagination in Laravel PHP
  • How do I convert HTML data to PDF using Laravel PHP?
  • How do I send mail attachment in laravel
  • How do I export data to excel in Laravel PHP
  • How do I clear the cache using Laravel PHP?
  • Write laravel example to set limit and offset in Laravel PHP
  • How do I create a Model in Laravel PHP ?
  • How do I resolve 419 page expired in Laravel PHP?
  • How do I convert Array to String in laravel PHP
  • How do I set TimeZone in Laravel PHP
  • Write Laravel Example to Write Multiple where conditions
  • How do I make curl HTTP request in laravel php
  • How do I get current URL in Laravel Controller or View?
  • How do I display query log in Laravel
  • How do I download files using Laravel PHP?
  • How do I get Query String values in Laravel?
  • Laravel Tutorial with Laravel8
  • Laravel Tutorial Install Laravel8
  • Laravel 9 - Whats new in Laravel 9
  • -->
    Article Contributed By :
    https://www.rrtutors.com/site_assets/profile/assets/img/avataaars.svg

    954 Views