SlideShare a Scribd company logo
Php Interview Questions
An Overview of PHP
PHP earlier stood for Personal Home Pages, but now it stands for Hypertext Pre-processor. PHP is a server-side scripting language
that is used for building web pages and applications. This language includes many Frameworks and CMS for creating large
websites. Even a non-technical person can create web pages or apps using PHP CMS or PHP frameworks. We have just added
more questions in our question bank for PHP interview questions and answers for experienced.
Development History of PHP:
Rasmus Lerdorf created PHP in 1994 and installed on more than 240 million websites and 2.1 million servers in 2013. A lot of
interviewees have asked about this in PHP logical interview questions and PHP technical interview questions for experienced
developers.
Key points about PHP:
Here are some of the essential PHP logical interview questions and answers that will support you in learning the PHP language
basics.
Latest Recommended Version:
Version 7.1 is the latest recommended version.
CMS vs Framework PHP
PHP supports various frameworks and CMS that are used to develop applications.
CMS in PHP is built with the website manager in mind. All CMS makes it very simple to manage the website content. The business
owner can change information on the website without a problem. CMS like WordPress, Drupal, Drupal, Joomla, Magento, etc
If you are preparing for PHP interviews, you can read PHP interview questions for clarity and insight.
The framework in PHP usually does not have the default standard user interfaces, which makes CMS so user-friendly. In the
framework, developers can create an interface using the available library methods. CSS frameworks like SASS or Bootstrap can be
used with PHP frameworks to develop a site for the best user experience. Developers can develop responsive sites using these front
end frameworks. Frameworks like Laravel, CakePHP, CodeIgniter, YII, etc
Our biggest and updated question bank for Advanced PHP interview questions are one of the biggest question bank available
online.
Advantages of PHP
Disadvantages of PHP
If you are looking for an opportunity to move ahead in your career as a PHP developer or if you are looking for PHP interview
questions and answers for experienced that can help you crack your interview.
Best php interview questions and answers
Looking for a new job? Do not miss to read our php interview questions and answers. Whether you are a fresher or an
It runs on various platforms, including Windows, Mac OS X, Linux, Unix, etc.
It is compatible with almost all servers, including Apache and IIS.
It supports many databases like MySQL, MongoDB, etc
It is free, easy to learn and runs on the server side.
PHP can operate various file operations on the server
Open source
Robust functions
Centralized built-in database
Extensive community support
Not very secure
Unable to manage a large number of apps
Unexpected bugs may appear
Best Interview Question
experienced, these questions and answers that can help you to crack your interview.
 Ques. 1. What is PHP? Why it is used?
PHP earlier stood for Personal Home Pages, but now it stands for Hypertext Pre-processor. PHP is a server-side scripting
language that is used for building web pages and applications. This language includes many Frameworks and CMS for
creating large websites.
Even a non-technical person can create web pages or apps using PHP CMS. PHP Supports various CMS like WordPress,
Joomla, Drupal and Frameworks like Laravel, CakePHP, Symfony, etc
 Ques. 2. What are the advantages of PHP?
 Ques. 3. Who developed PHP?
PHP was developed by Rasmus Lerdorf in 1994.
 Ques. 4. What is the latest version of PHP and Mysql?
PHP 7.1 is the latest version of PHP and 8.0 is the newest version of Mysql.
 Ques. 5. Please explain the difference between unlink() and unset()?
unlink() : It is used to delete a file.
unset() : It is used to unset a file.
Example
unlink('headbar.php');
unset(&variable);
 suggest an answer
Open source
Robust functions
Centralized built-in database
Extensive community support
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
More interview Questions from PHP
 Ques. 6. How many types of errors in PHP?
Primarily PHP supports four types of errors, listed below:-
1. Syntax Error: It will occur if there is a syntax mistake in the script
2. Fatal Error: It will happen if PHP does not understand what you have written. For example, you are calling a function, but
that function does not exist. Fatal errors stop the execution of the script.
3. Warning Error: It will occur in following cases to include a missing file or using the incorrect number of parameters in a
function.
4. Notice Error: It will happen when we try to access the undefined variable.
 Ques. 7. What is the significant difference between require() and include()?
require() : If a required file not found, it will through a fatal error & stops the code execution
include() : If an essential file not found, It will produce a warning and execute the remaining scripts.
 Ques. 8. How to we can get IP Address of users machine?
If we used $_SERVER[‘REMOTE_ADDR’] to get an IP address, but sometimes it will not return the correct value. If the client is
connected with the Internet through Proxy Server then $_SERVER[‘REMOTE_ADDR’] in PHP, it returns the IP address of the proxy
server not of the user’s machine.
So here is a simple function in PHP to find the real IP address of the user’s machine.
Example
OOPS INTERVIEW QUESTIONS
LARAVEL INTERVIEW QUESTIONS
WORDPRESS INTERVIEW QUESTIONS
YII INTERVIEW QUESTIONS
DRUPAL INTERVIEW QUESTIONS
JOOMLA INTERVIEW QUESTIONS
CAKEPHP INTERVIEW QUESTIONS
CODEIGNITER INTERVIEW QUESTIONS
YII 2 INTERVIEW QUESTIONS
LARAVEL 5 INTERVIEW QUESTIONS
ZEND FRAMEWORK INTERVIEW QUESTIONS
ZEND 2 FRAMEWORK INTERVIEW QUESTIONS
SYMFONY INTERVIEW QUESTIONS
MAGENTO INTERVIEW QUESTIONS
OPENCART INTERVIEW QUESTIONS
Syntax Error
Fatal Error
Warning Error
Notice Error
 suggest an answer
 suggest an answer
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
 Ques. 9. Difference between require() and require_once() in PHP? When can we use these functions?
require() and require_once() both are used for include PHP files into another PHP files. But the difference is with the help of
require() we can include the same file many times in a single page, but in case of require_once() we can call the same file
many times, but PHP includes that file only single time.
 Ques. 10. What is the difference between GET & POST ?
These both methods are based on the HTTP method.
GET POST
The GET method transfer data in
the form of QUERY_STRING. Using
GET it provides a $_GET associative
array to access data
The post method transfer form data by HTTP Headers. This POST method does not
have any restriction on data size to be sent. With POST method data can travel
within the form of ASCII as well as binary data. Using POST, it provides a $_POST
associative array to access data.
For Example: https://www.bestinterviewquestion.com/index.html?name1=value1&name2=value2
We have listed some of the PHP developer interview questions and answers for experienced as well as for freshers.
 Ques. 11. How can we make a constant in PHP?
With the help of define(), we can make constants in PHP.
Example
define('DB_NAME', 'bestInterviewQ')
 suggest an answer
 suggest an answer
 suggest an answer
 Ques. 12. List some array functions in PHP?
In PHP array() are the beneficial and essential thing. It allows to access and manipulate with array elements.
List of array() functions in PHP
 Ques. 13. List some string function name in PHP?
PHP has lots of string function that helps in development. Here are some PHP string functions.
 Ques. 14. How can we upload a file in PHP?
For file upload in PHP make sure that the form uses method="post" and attribute: enctype="multipart/form-data". It specifies
that which content-type to use when submitting the form.
Example
 suggest an answer
array()
count()
array_flip()
array_key_exists()
array_merge()
array_pop()
array_push()
array_unique()
implode()
explode()
in_array()
 suggest an answer
nl2br()
trim()
str_replace()
str_word_count()
strlen()
strpos()
strstr()
strtolower()
strtoupper()
 suggest an answer
$target_dir = "upload/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
echo "File is not an image.";
$uploadOk = 0;
}
}
 Ques. 15. Explain the difference between session and cookies in PHP?
Session and Cookies both functions are used to store information. But the main difference between a session and a cookie
is that in case of session data is stored on the server but cookies stored data on the browsers.
Sessions are more secure than cookies because session stored information on servers. We can also turn off Cookies from
the browser.
Example
session_start();
//session variable
$_SESSION['user'] = 'BestInterviewQuestion.com';
//destroyed the entire sessions
session_destroy();
//Destroyed the session variable "user".
unset($_SESSION['user']);
Example of Cookies
setcookie(name, value, expire, path,domain, secure, httponly);
$cookie_uame = "user";
$cookie_uvalue= "Umesh Singh";
//set cookies for 1 hour time
setcookie($cookie_uname, $cookie_uvalue, 3600, "/");
//expire cookies
setcookie($cookie_uname,"",-3600);
 suggest an answer
 Ques. 16. What are headers in PHP?
In PHP header() is used to send a raw HTTP header. It must be called before any actual output is sent, either by normal HTML
tags, blank lines in a file, or from PHP
Example :
header(string,replace,http_response_code);
1. string: It is the required parameters. It specifies the header string to send.
2. replace: It is optional. It indicates whether the header should replace previous or add a second header.
3. http_response_code : It is optional. It forces the HTTP response code to the specified value
 Ques. 17. What is the difference between file_get_contents() and file_put_contents() in PHP?
PHP has multiple functions to handle files operations like read, write, create or delete a file or file contents.
1. file_put_contents():It is used to create a new file.
Syntax :
file_put_contents(file_name, contentstring, flag)
If file_name doesn't exist, the file is created with the contentstring content. Else, the existing file is override, unless the
FILE_APPEND flag is set.
2. file_get_contents(): It is used to read the contents of a text file.
file_get_contents($filename);
 Ques. 18. In PHP, how to redirect from one page to another page?
With the heal of the header(), we can redirect from one page to another in PHP.
Syntax :
header('location:index.php');
 Ques. 19. What is the meaning of "enctype= multipart/form-data" ?
HTML forms provide three methods of encoding.
multipart/form-data
This is used to upload files to the server. It means no characters will be encoded. So It is used when a form requires binary
data, like the contents of a file, to be uploaded.
 Ques. 20. What is the role of the .htaccess file in php?
The .htaccess file is a type of configuration file for use on web servers running the Apache Web Server software. It is used to
alter the configuration of our Apache Server software to enable or disable additional functionality that the Apache Web
Server software has to offer.
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
application/x-www-form-urlencoded (the default)
multipart/form-data
text/plain
 suggest an answer
 suggest an answer
 Ques. 21. How to add comments in PHP?
In PHP comments are two types.
01. Single line comments
02. Multi line comments
1. Single line comments: It is used comments a single line of code. It disables a line of PHP code. You have to add // or #
before the system.
2. Multi line comments: It is used to comment large blocks of code or writing multiple line comments. You have to add /*
before and */ after the system.
 Ques. 22. Explain the difference between array_merge() and array_combine()?
1. array_combine(): It is used to creates a new array by using the key of one array as keys and using the value of another
array as values.
Example :
$array1 = array('key1', 'key2', 'key3');
$array2 = array(('umesh', 'sonu', 'deepak');
$new_array = array_combine($array1, $array2);
print_r($new_array);
OUTPUT : Array([key1] => umesh[key2] => sonu[key2] =>deepak)
2. array_merge(): It merges one or more than one array such that the value of one array appended at the end of the first
array. If the arrays have the same strings key, then the next value overrides the previous value for that key.
Example :
$array1 = array("one" => "java","two" => "sql");
$array2 = array("one" => "php","three" => "html","four"=>"Me");
$result = array_merge($array1, $array2);
print_r($result);
Array ( [one] => php [two] => sql [three] => html [four] => Me )
 Ques. 23. How to get a total number of elements used in the array?
We can use the count() or size() function to get the number of elements or values in an array in PHP.
Example
$element = array("sunday","monday","tuesday");
echo count($element );
echo sizeof($element );
 Ques. 24. What is the difference between public, protected and private?
PHP has three access modifiers such as public, private and protected.
 suggest an answer
 suggest an answer
 suggest an answer
public scope of this variable or function is available from anywhere, other classes and instances of the object.
private scope of this variable or function is available in its class only.
protected scope of this variable or function is available in all classes that extend the current class including the parent
class.
 suggest an answer
 Ques. 25. What is the difference between implode() and explode() in php?
explode() function breaks a string into an array, but the implode() function returns a series from the elements of an array.
Example : $arr = array("1","2","3","4","5");
$str = implode("-",$arr);
OUTPUT
1-2-3-4-5
$array2 = "My name is umesh";
$a = explode(" ",$array2 );
print_r ($a);
OUTPUT
$a = Array ("My", "name", "is", "umesh");
 Ques. 26. What is the difference server side and browser side validation?
We need to add validation rules while making web forms. It is used because we need to take inputs from the user in the right
way like we need the right email address in the email input field. Some time user did not enter the correct address as we
aspect. That's why we need validation.
Validations can be applied on the server side or the client side.
Server Side Validation
In the Server Side Validation, the input submitted by the user is being sent to the server and validated using one of the server-
side scripting languages like ASP.Net, PHP, etc.
Client Side Validation
In the Client Side Validation, we can provide a better user experience by responding quickly at the browser level.
 Ques. 27. How to create and destroy cookies in PHP?
A cookie is a small file that stores on user's browsers. It is used to store users information. We can create and retrieve cookie
values in PHP.
A cookie can be created with the setcookie() function in PHP.
Example
 suggest an answer
 suggest an answer
Create Cookie
$cookie_name = "username";
$cookie_value = "Umesh Singh";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
Update Cookie
$cookie_name = "username";
$cookie_value = "Alex Porter";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
Delete Cookie
setcookie("username", "", time() - 3600);
 Ques. 28. What is the difference between fopen() and fclose()?
These both are PHP inbuilt function which is used to open & close a file which is pointed file pointer.
S.no fopen() fclose()
1. This method is used to open a file in PHP. This method is used to close a file in PHP. It returns true or
false on success or failure.
2. $myfile = fopen("index.php", "r") or
die("Unable to open file!");
$myfile = fopen("index.php", "r");
 Ques. 29. What is the difference between php 5 and php 7?
There are differences between php5 and php7.
On our website you will find industy's best PHP interview questions for 5 year experience.
 Ques. 30. How to get last inserted id after insert data from a table in mysql?
 suggest an answer
 suggest an answer
PHP 5 is released 28 August 2014 but PHP 7 released on 3 December 2015
It is one of the advantages of the new PHP 7 is the compelling improvement of performance.
Improved Error Handling
Supports 64-bit windows systems
Anonymous Class
New Operators
 suggest an answer
mysql_insert_id() is used to get last insert id. It is used after insert data query. It will work when id is enabled as AUTO
INCREMENT
 Ques. 31. How to remove HTML tags from data in PHP?
With the help of strip_tags() we can removed html tags from data in PHP. The strip_tags() function strips a string from HTML,
XML, and PHP tags.
strip_tags(string,allow)
First parameter is required. It specifies the string to check.
The second parameter is optional. It specifies allowable tags. Mention tags will not be removed
 Ques. 32. What is str_replace()?
It is used to replaces some characters with some other characters in a string.
Suppose, we want to Replace the characters "Umesh" in the string "Umesh Singh" with "Sonu"
echo str_replace("Umesh","Sonu","Umesh Singh");
 Ques. 33. What is substr() in PHP? and how it is used?
It is used to extract a part of the string. It allows three parameters or arguments out of which two are mandatory, and one is
optional
echo substr("Hello world",6);
It will return first six characters from a given string.
 Ques. 34. What the use of var_dump()?
It is used to dump information about one or more variables. It displays structured data such as the type and value of the
given variable.
Example:
$var_name1=12; int(12);
 Ques. 35. What is the use of nl2br() in PHP?
It is used to inserts HTML line breaks ( <br /> or <br /> ) in front of each newline (n) in a string.
 Ques. 36. Please explain the difference between $var and $$var?
$$var is known as reference variable where $var is a normal variable.
 Ques. 37. Please explain the difference between isset() and empty()?
1. isset(): It returns TRUE if the variable exists and has a value other than NULL. It means variables assigned a "", 0, "0", or FALSE
are set.
2. empty(): It checks to see if a variable is empty. It interpreted as: "" (an empty string).
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
isset($var) && !empty($var)
will be equals to !empty($var)
 Ques. 38. Explain the difference between mysql_fetch_array(), mysql_fetch_object()?
1. mysql_fetch_object: It returns the result from the database as objects. In this field can be accessed as $result->name
2. mysql_fetch_array: It returns result as an array. In this field can be accessed as $result->[name]
 Ques. 39. What are the __construct() and __destruct() methods in a PHP class?
Constructor and a Destructor both are special functions which are automatically called when an object is created and
destroyed.
Example
class Animal
{
public $name = "Hello";
public function __construct($name)
{
echo "Live HERE";
$this->name = $name;
}
public function __destruct()
{
echo "Destroy here";
}
}
$animal = new Animal("Bob");
echo "My Name is : " . $animal->name;
 Ques. 40. How to get complete current page URL in PHP?
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") .
"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
 Ques. 41. How to include a file code in different files in PHP?
For including a file into another PHP file we can use various function like include(), include_once(), require(), require_once().
Example
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
<?php require('footer.php') ?>
 Ques. 42. List some sorting functions in PHP?
The items of an array can be sorted by various methods.
 Ques. 43. How can we enable error reporting in PHP?
The error_reporting() function defines which errors are reported.We can modify these errors in php.ini. You can use these
given function directly in php file.
error_reporting(E_ALL);
ini_set('display_errors', '1');
 Ques. 44. What are magic methods?
Magic methods are unique names, starts with two underscores, which denote means which will be triggered in response to
particular PHP events.
The magic methods available in PHP are given below:-
 Ques. 45. What are traits? How is it used in PHP?
A trait is a group of various methods that reuse in single inheritance. A Trait is intended to reduce some limitations of single
inheritance by enabling a developer to reuse sets of processes.
Example
 suggest an answer
sort() - it sort arrays in ascending order
rsort() - it sort arrays in descending order
asort() - it sorts associative arrays in ascending order, according to the value
ksort() - it sort associative arrays in ascending order, according to the key
arsort() - it sorts associative arrays in descending order, according to the value
krsort() - it sorts associative arrays in descending order, according to the key
 suggest an answer
 suggest an answer
__construct()
__destruct()
__call()
__get()
__unset()
__autoload()
__set()
__isset()
 suggest an answer
trait HelloWorld
{
use Hello, World;
}
class MyWorld
{
use HelloWorld;
}
$world = new MyWorld();
echo $world->sayHello() . " " . $world->sayWorld(); //Hello World
 Ques. 46. What is inheritance in PHP? How many types of inheritance supports PHP?
Inheritance has three types, are given below.
But PHP supports only single inheritance, where only one class can be derived from a single parent class. We can do the
same thing like multiple inheritance by using interfaces.
 Ques. 47. How to download files from an external server with code in PHP?
We can do it by various methods, If you have allow_url_fopen set to true:
Example
 suggest an answer
Single inheritance
Multiple inheritance
Multilevel inheritance
 suggest an answer
We can download images or files from an external server with cURL() But in this case, curl has been enabled on both
servers
We can also do it by file_put_contents()
$ch = curl_init();
$source = "http://abc.com/logo.jpg";
curl_setopt($ch, CURLOPT_URL, $source);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec ($ch);
curl_close ($ch);
$destination = "/images/newlogo.jpg";
$file = fopen($destination, "w+");
fputs($file, $data);
fclose($file);
/*-------This is another way to do it-------*/
$url = 'http://abc.com/logo.jpg';
$img = '/images/flower.jpg';
file_put_contents($img, file_get_contents($url));
 Ques. 48. What are the different MySQL database engines?
With PHP 5.6+ "InnoDB" is treated by default database storage engine. Before that MyISAM defaulted storage engine.
 Ques. 49. What is the difference between = , == and ===?
These all are PHP Operators.
= is used to assign value in variables. It is also called assignments operators.
== is used to check if the benefits of the two operands are equal or not.
=== is used checks the values as well as its data type.
We have covered all levels of PHP interview question for fresher - basic and advanced levels.
 Ques. 50. How to make a class in PHP?
We can define a class with keyword "class" followed by the name of the class.
Example :
class phpClass {
public function test() {
echo 'Test';
}
 suggest an answer
InnoDB
CSV
MEMORY
ARCHIVE
MyISAM
 suggest an answer
 suggest an answer
}
 Ques. 51. What are the final class and final method?
Its properties cannot be declared final, only classes and methods may be declared as final. If the class or method defined as
final, then it cannot be extended.
Example
class childClassname extends parentClassname {
protected $numPages;
public function __construct($autor, $pages) {
$this->_autor = $autor;
$this->numPages = $pages;
}
final public function PageCount() {
return $this->numPages;
}
}
 Ques. 52. Please write a query to find the 2nd highest salary of an employee from the employee table?
You can use this SELECT MAX(salary) FROM employee WHERE Salary NOT IN ( SELECT Max(Salary) FROM employee); Query to find
the 2nd highest salary of the employee.
 Ques. 53. What is the role of a limit in a MySQL query?
It is used with the SELECT statement to restrict the number of rows in the result set. Limit accepts one or two arguments which
are offset and count.
The syntax of limit is a
SELECT name, salary FROM employee LIMIT 1, 2
 Ques. 54. How to get a total number of rows available in the table?
COUNT(*) is used to count the number of rows in the table.
SELECT COUNT(*) FROM BestPageTable;
 Ques. 55. What is MVC?
MVC is an application in PHP which separates the application data and model from the view.
The full form of MVC is Model, View & Controller. The controller is used to interacting between the models and views.
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
Example: Laravel, YII, etc
 Ques. 56. What is a composer?
It is an application package manager for the PHP programming language that provides a standard format for managing
dependencies of PHP software. The composer is developed by Nils Adermann and Jordi Boggiano, who continue to lead the
project. The composer is easy to use, and installation can be done through the command line.
It can be directly downloaded from https://getcomposer.org/download
 Ques. 57. What is the use of $_SERVER["PHP_SELF"] variable?
It is used to get the name and path of current page/file.
 Ques. 58. What is the use of @ in Php?
It suppresses error messages. It’s not a good habit to use @ because it can cause massive debugging headaches because
it will even contain critical errors
 Ques. 59. What is namespace in PHP?
Namespace allows us to use the same function or class name in different parts of the same program without causing a
name collision.
Example
Namespace MyAPP;
function output() {
echo 'IOS!';
}
namespace MyNeWAPP;
function output(){
echo 'RSS!';
}
 Ques. 60. How we get browser details of clients machine?
With the help of $_SERVER['HTTP_USER_AGENT']
 Ques. 61. What is the use of cURL()?
It is a PHP library and a command line tool that helps us to send files and also download data over HTTP and FTP. It also
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
 suggest an answer
supports proxies, and you can transfer data over SSL connections.
Example
Using cURL function module to fetch the abc.in homepage
$ch = curl_init("https://www.bestinterviewquestion.com/");
$fp = fopen("index.php", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
 Ques. 62. Write a program to display Reverse of any number?
$num = 12345;
$revnum = 0;
while ($num > 1)
{
$rem = $num % 10;
$revnum = ($revnum * 10) + $rem;
$num = ($num / 10);
}
echo "Reverse number of 12345 is: $revnum";
 Ques. 63. How to check whether a number is Prime or not?
Example
 suggest an answer
 suggest an answer
function IsPrime($n) {
for($x=2; $x<$n; $x++)
{
if($n %$x ==0) {
return 0;
}
}
return 1;
}
$a = IsPrime(3);
if ($a==0)
echo 'Its not Prime Number.....'."n";
else
echo 'It is Prime Number..'."n";
 Ques. 64. Write a program to display a table of any given number?
Example
function getTableOfGivenNumber($number) {
for($i=1 ; $i<=10 ; $i++) {
echo $i*$number;
}
}
getTableOfGivenNumber(5);
 Ques. 65. How to write a program to make chess?
 suggest an answer
 suggest an answer
 suggest an answer
 Ques. 66. What is the difference between abstract class and interface in php?
Many differences occur between the interface and abstract class in php.
 Ques. 67. What are aggregate functions in MySQL?
The aggregate function performs a calculation on a set of values and returns a single value. It ignores NULL values when it
performs calculation except for the COUNT function.
MySQL provides various aggregate functions that include AVG(), COUNT(), SUM(), MIN(), MAX().
 Ques. 68. What is the difference between MyISAM and InnoDB?
There are lots of differences between both storage engines. Some are given below:-
This is a good question concerning PHP programming interview questions and answers for freshers.
 Ques. 69. What is SQL injection?
 Ques. 70. How to redirect https to HTTP URL through .htaccess?
Place this code in your htaccess file.
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
 Ques. 71. What is the Apache?
Apache HTTP server is the most popular open source web server. Apache has been in use since the year 1995. It powers more
websites than any other product.
Abstract methods can declare with protected, public, private. But in case of Interface methods stated with the public.
Abstract classes can have method stubs, constants, members, and defined processes, but interfaces can only have
constants and methods stubs.
Abstract classes do not support multiple inheritance but interface support this.
Abstract classes can contain constructors, but the interface does not support constructors.
 suggest an answer
 suggest an answer
MyISAM supports Table-level Locking, but InnoDB supports Row-level Locking
MyISAM designed for the need of speed but InnoDB designed for maximum performance when processing a high volume
of data
MyISAM does not support foreign keys, but InnoDB support foreign keys
MyISAM supports full-text search, but InnoDB does not support this
MyISAM does not support the transaction, but InnoDB supports transaction
You cannot commit and rollback with MyISAM, but You can determine and rollback with InnoDB
MyISAM stores its data, tables, and indexes in disk space using separate three different files, but InnoDB stores its indexes
and tables in a tablespace
 suggest an answer
 suggest an answer
 suggest an answer
 Ques. 72. What is the difference between Apache and Tomcat?
Both used to deploy your Java Servlets and JSPs. Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server
serving Java technologies.
 Ques. 73. What is the best way to avoid email sent through PHP getting into the spam folder?
 Ques. 74. What is PEAR in PHP?
It stands for PHP Extension and Application Repository. It is that the next revolution in PHP. It is used to install packages
automatically.
 Ques. 75. What is the difference between REST and Soap?
 Ques. 76. How to make database connection in PHP?
Example
 suggest an answer
 suggest an answer
Sending mail using the PHP mail function with minimum parameters we tend to should use headers like MIME-version,
Content-type, reply address, from address, etc. to avoid this case
Did not use correct SMTP mail script like PHPmailer.
Should not use website link in mail content.
 suggest an answer
 suggest an answer
SOAP represent for Simple Object Access Protocol, and REST stands for Representation State Transfer.
SOAP is a protocol and Rest is an architectural style.
SOAP permits XML data format only but REST permits different data format such as Plain text, HTML, XML, JSON, etc
SOAP requires more bandwidth and resource than REST so avoid to use SOAP where bandwidth is minimal.
 suggest an answer
$servername = "your hostname";
$username = "your database username";
$password = "your database password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Not Connected: " . $conn->connect_error);
}
echo "Connected";
 suggest an answer
Most Searched Questions
LARAVEL INTERVIEW QUESTIONS
60
WORDPRESS INTERVIEW QUESTIONS
50
YII INTERVIEW QUESTIONS
27
REACT JS INTERVIEW QUESTIONS
31
JQUERY INTERVIEW QUESTIONS
50
ANGULARJS INTERVIEW QUESTIONS
30
HTML INTERVIEW QUESTIONS
33
CSS INTERVIEW QUESTIONS
35
NODE JS INTERVIEW QUESTIONS
56
C++ INTERVIEW QUESTIONS
28
JAVA INTERVIEW QUESTIONS
49
ASP.NET INTERVIEW QUESTIONS
18
GO PROGRAMMING INTERVIEW QUESTIONS
34
PYTHON INTERVIEW QUESTIONS
30
SQL INTERVIEW QUESTIONS
25
MYSQL INTERVIEW QUESTIONS
38
MONGODB INTERVIEW QUESTIONS
23
PHP INTERVIEW QUESTIONS
76
BOOTSTRAP INTERVIEW QUESTIONS
27
IOS INTERVIEW QUESTIONS
65
Latest Blogs
Features of laravel 5.7 over other versions
1 month ago
5 Reasons PHP is the Most Preferred Language
1 month ago
Frameworks vs. CMS – Which One is Better and Why?
1 month ago
Why Bootstrap is the Best UI Design Tool
1 month ago
Featured Category
Development Frontend /UI Database
Web
Design Mobile App Government HR
Testing /
QA
Networking Digital Marketing CRM GIT PHP SEO SEM
PHP Interview Questions
PHP Interview Questions
Laravel Interview Questions
Wordpress Interview Questions
symfony Interview Questions
Drupal Interview Questions
YII Interview Questions
Opencart Interview Questions
CakePHP Interview Questions
OOPS Interview Questions
Popular Interview Questions
Node JS Interview Questions
GO Interview Questions
Python Interview Questions
HTML Interview Questions
CSS Interview Questions
React JS Interview Questions
Angular JS Interview Questions
Mysql Interview Questions
Common Interview Questions
Our Categories
Website development
HR Interview Questions
SEO Interview Questions
Database Interview Questions
Frontend / UI Interview Question
Testing / QA Interview Questions
Mobile App Interview Questions
Designing Interview Questions
Govt. jobs Interview Questions
Newsletter
Stay update with our latest interview questions
Home About Us Blog Contact Privacy Policy

Your Email Address
Copyright © 2018 All rights reserved | Application is made by Sharptechsolution
    
Ad

Recommended

Spring Framework - AOP
Spring Framework - AOP
Dzmitry Naskou
 
Use Node.js to create a REST API
Use Node.js to create a REST API
Fabien Vauchelles
 
Ajax ppt
Ajax ppt
OECLIB Odisha Electronics Control Library
 
Rest api standards and best practices
Rest api standards and best practices
Ankita Mahajan
 
Dependency Injection in Spring in 10min
Dependency Injection in Spring in 10min
Corneil du Plessis
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
Nodejs presentation
Nodejs presentation
Arvind Devaraj
 
Basics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdf
Knoldus Inc.
 
reactJS
reactJS
Syam Santhosh
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
Ashokkumar T A
 
SPA時代のOGPとの戦い方
SPA時代のOGPとの戦い方
Yoichi Toyota
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
BJ Jang
 
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
Ji-Woong Choi
 
Understanding REST
Understanding REST
Nitin Pande
 
Expressjs
Expressjs
Yauheni Nikanovich
 
Ajax and Jquery
Ajax and Jquery
People Strategists
 
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
NAVER D2
 
Git을 조금 더 알아보자!
Git을 조금 더 알아보자!
Young Kim
 
아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리
라한사 아
 
Express node js
Express node js
Yashprit Singh
 
Mixpanel
Mixpanel
NexThoughts Technologies
 
JavaScript JQUERY AJAX
JavaScript JQUERY AJAX
Makarand Bhatambarekar
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
Reactjs
Reactjs
Neha Sharma
 
Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5
Devang Garach
 
Node.js Express
Node.js Express
Eyal Vardi
 
Introduction to .NET Core
Introduction to .NET Core
Marco Parenzan
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
iimjobs and hirist
 
Php interview questions
Php interview questions
sekar c
 

More Related Content

What's hot (20)

reactJS
reactJS
Syam Santhosh
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
Ashokkumar T A
 
SPA時代のOGPとの戦い方
SPA時代のOGPとの戦い方
Yoichi Toyota
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
BJ Jang
 
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
Ji-Woong Choi
 
Understanding REST
Understanding REST
Nitin Pande
 
Expressjs
Expressjs
Yauheni Nikanovich
 
Ajax and Jquery
Ajax and Jquery
People Strategists
 
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
NAVER D2
 
Git을 조금 더 알아보자!
Git을 조금 더 알아보자!
Young Kim
 
아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리
라한사 아
 
Express node js
Express node js
Yashprit Singh
 
Mixpanel
Mixpanel
NexThoughts Technologies
 
JavaScript JQUERY AJAX
JavaScript JQUERY AJAX
Makarand Bhatambarekar
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
Reactjs
Reactjs
Neha Sharma
 
Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5
Devang Garach
 
Node.js Express
Node.js Express
Eyal Vardi
 
Introduction to .NET Core
Introduction to .NET Core
Marco Parenzan
 
Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
Ashokkumar T A
 
SPA時代のOGPとの戦い方
SPA時代のOGPとの戦い方
Yoichi Toyota
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
NGINX, Inc.
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
BJ Jang
 
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
[오픈소스컨설팅]Zabbix Installation and Configuration Guide
Ji-Woong Choi
 
Understanding REST
Understanding REST
Nitin Pande
 
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
백억개의 로그를 모아 검색하고 분석하고 학습도 시켜보자 : 로기스
NAVER D2
 
Git을 조금 더 알아보자!
Git을 조금 더 알아보자!
Young Kim
 
아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리
라한사 아
 
ReactJS presentation
ReactJS presentation
Thanh Tuong
 
Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5
Devang Garach
 
Node.js Express
Node.js Express
Eyal Vardi
 
Introduction to .NET Core
Introduction to .NET Core
Marco Parenzan
 

Similar to Php Interview Questions (20)

Top 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
iimjobs and hirist
 
Php interview questions
Php interview questions
sekar c
 
PHP Interview Questions
PHP Interview Questions
MaryamAnwar10
 
Php interview questions with answer
Php interview questions with answer
Soba Arjun
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
AshokKumar3319
 
25 php interview questions – codementor
25 php interview questions – codementor
Arc & Codementor
 
10_introduction_php.ppt
10_introduction_php.ppt
MercyL2
 
introduction_php.ppt
introduction_php.ppt
ArunKumar313658
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
phpwebdev.ppt
phpwebdev.ppt
rawaccess
 
10_introduction_php.ppt
10_introduction_php.ppt
GiyaShefin
 
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
 
PHP Hypertext Preprocessor
PHP Hypertext Preprocessor
adeel990
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
Shashank Skills Academy
 
Php Tutorial
Php Tutorial
SHARANBAJWA
 
PHP - Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
web design and development.docx
web design and development.docx
Software by silentsoul
 
PHP ITCS 323
PHP ITCS 323
Sleepy Head
 
PHP TRAINING
PHP TRAINING
gurjinderbains
 
Php&amp;yii2
Php&amp;yii2
RakhiBhojwani
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
iimjobs and hirist
 
Php interview questions
Php interview questions
sekar c
 
PHP Interview Questions
PHP Interview Questions
MaryamAnwar10
 
Php interview questions with answer
Php interview questions with answer
Soba Arjun
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
AshokKumar3319
 
25 php interview questions – codementor
25 php interview questions – codementor
Arc & Codementor
 
10_introduction_php.ppt
10_introduction_php.ppt
MercyL2
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
phpwebdev.ppt
phpwebdev.ppt
rawaccess
 
10_introduction_php.ppt
10_introduction_php.ppt
GiyaShefin
 
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
 
PHP Hypertext Preprocessor
PHP Hypertext Preprocessor
adeel990
 
Ad

Recently uploaded (20)

SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Intellectual Property Right (Jurisprudence).pptx
Intellectual Property Right (Jurisprudence).pptx
Vishal Chanalia
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
Chalukyas of Gujrat, Solanki Dynasty NEP.pptx
Chalukyas of Gujrat, Solanki Dynasty NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Intellectual Property Right (Jurisprudence).pptx
Intellectual Property Right (Jurisprudence).pptx
Vishal Chanalia
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
 
Ad

Php Interview Questions

  • 1. Php Interview Questions An Overview of PHP PHP earlier stood for Personal Home Pages, but now it stands for Hypertext Pre-processor. PHP is a server-side scripting language that is used for building web pages and applications. This language includes many Frameworks and CMS for creating large websites. Even a non-technical person can create web pages or apps using PHP CMS or PHP frameworks. We have just added more questions in our question bank for PHP interview questions and answers for experienced. Development History of PHP: Rasmus Lerdorf created PHP in 1994 and installed on more than 240 million websites and 2.1 million servers in 2013. A lot of interviewees have asked about this in PHP logical interview questions and PHP technical interview questions for experienced developers. Key points about PHP: Here are some of the essential PHP logical interview questions and answers that will support you in learning the PHP language basics. Latest Recommended Version: Version 7.1 is the latest recommended version. CMS vs Framework PHP PHP supports various frameworks and CMS that are used to develop applications. CMS in PHP is built with the website manager in mind. All CMS makes it very simple to manage the website content. The business owner can change information on the website without a problem. CMS like WordPress, Drupal, Drupal, Joomla, Magento, etc If you are preparing for PHP interviews, you can read PHP interview questions for clarity and insight. The framework in PHP usually does not have the default standard user interfaces, which makes CMS so user-friendly. In the framework, developers can create an interface using the available library methods. CSS frameworks like SASS or Bootstrap can be used with PHP frameworks to develop a site for the best user experience. Developers can develop responsive sites using these front end frameworks. Frameworks like Laravel, CakePHP, CodeIgniter, YII, etc Our biggest and updated question bank for Advanced PHP interview questions are one of the biggest question bank available online. Advantages of PHP Disadvantages of PHP If you are looking for an opportunity to move ahead in your career as a PHP developer or if you are looking for PHP interview questions and answers for experienced that can help you crack your interview. Best php interview questions and answers Looking for a new job? Do not miss to read our php interview questions and answers. Whether you are a fresher or an It runs on various platforms, including Windows, Mac OS X, Linux, Unix, etc. It is compatible with almost all servers, including Apache and IIS. It supports many databases like MySQL, MongoDB, etc It is free, easy to learn and runs on the server side. PHP can operate various file operations on the server Open source Robust functions Centralized built-in database Extensive community support Not very secure Unable to manage a large number of apps Unexpected bugs may appear Best Interview Question
  • 2. experienced, these questions and answers that can help you to crack your interview.  Ques. 1. What is PHP? Why it is used? PHP earlier stood for Personal Home Pages, but now it stands for Hypertext Pre-processor. PHP is a server-side scripting language that is used for building web pages and applications. This language includes many Frameworks and CMS for creating large websites. Even a non-technical person can create web pages or apps using PHP CMS. PHP Supports various CMS like WordPress, Joomla, Drupal and Frameworks like Laravel, CakePHP, Symfony, etc  Ques. 2. What are the advantages of PHP?  Ques. 3. Who developed PHP? PHP was developed by Rasmus Lerdorf in 1994.  Ques. 4. What is the latest version of PHP and Mysql? PHP 7.1 is the latest version of PHP and 8.0 is the newest version of Mysql.  Ques. 5. Please explain the difference between unlink() and unset()? unlink() : It is used to delete a file. unset() : It is used to unset a file. Example unlink('headbar.php'); unset(&variable);  suggest an answer Open source Robust functions Centralized built-in database Extensive community support  suggest an answer  suggest an answer  suggest an answer  suggest an answer
  • 3. More interview Questions from PHP  Ques. 6. How many types of errors in PHP? Primarily PHP supports four types of errors, listed below:- 1. Syntax Error: It will occur if there is a syntax mistake in the script 2. Fatal Error: It will happen if PHP does not understand what you have written. For example, you are calling a function, but that function does not exist. Fatal errors stop the execution of the script. 3. Warning Error: It will occur in following cases to include a missing file or using the incorrect number of parameters in a function. 4. Notice Error: It will happen when we try to access the undefined variable.  Ques. 7. What is the significant difference between require() and include()? require() : If a required file not found, it will through a fatal error & stops the code execution include() : If an essential file not found, It will produce a warning and execute the remaining scripts.  Ques. 8. How to we can get IP Address of users machine? If we used $_SERVER[‘REMOTE_ADDR’] to get an IP address, but sometimes it will not return the correct value. If the client is connected with the Internet through Proxy Server then $_SERVER[‘REMOTE_ADDR’] in PHP, it returns the IP address of the proxy server not of the user’s machine. So here is a simple function in PHP to find the real IP address of the user’s machine. Example OOPS INTERVIEW QUESTIONS LARAVEL INTERVIEW QUESTIONS WORDPRESS INTERVIEW QUESTIONS YII INTERVIEW QUESTIONS DRUPAL INTERVIEW QUESTIONS JOOMLA INTERVIEW QUESTIONS CAKEPHP INTERVIEW QUESTIONS CODEIGNITER INTERVIEW QUESTIONS YII 2 INTERVIEW QUESTIONS LARAVEL 5 INTERVIEW QUESTIONS ZEND FRAMEWORK INTERVIEW QUESTIONS ZEND 2 FRAMEWORK INTERVIEW QUESTIONS SYMFONY INTERVIEW QUESTIONS MAGENTO INTERVIEW QUESTIONS OPENCART INTERVIEW QUESTIONS Syntax Error Fatal Error Warning Error Notice Error  suggest an answer  suggest an answer
  • 4. function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; }  Ques. 9. Difference between require() and require_once() in PHP? When can we use these functions? require() and require_once() both are used for include PHP files into another PHP files. But the difference is with the help of require() we can include the same file many times in a single page, but in case of require_once() we can call the same file many times, but PHP includes that file only single time.  Ques. 10. What is the difference between GET & POST ? These both methods are based on the HTTP method. GET POST The GET method transfer data in the form of QUERY_STRING. Using GET it provides a $_GET associative array to access data The post method transfer form data by HTTP Headers. This POST method does not have any restriction on data size to be sent. With POST method data can travel within the form of ASCII as well as binary data. Using POST, it provides a $_POST associative array to access data. For Example: https://www.bestinterviewquestion.com/index.html?name1=value1&name2=value2 We have listed some of the PHP developer interview questions and answers for experienced as well as for freshers.  Ques. 11. How can we make a constant in PHP? With the help of define(), we can make constants in PHP. Example define('DB_NAME', 'bestInterviewQ')  suggest an answer  suggest an answer  suggest an answer
  • 5.  Ques. 12. List some array functions in PHP? In PHP array() are the beneficial and essential thing. It allows to access and manipulate with array elements. List of array() functions in PHP  Ques. 13. List some string function name in PHP? PHP has lots of string function that helps in development. Here are some PHP string functions.  Ques. 14. How can we upload a file in PHP? For file upload in PHP make sure that the form uses method="post" and attribute: enctype="multipart/form-data". It specifies that which content-type to use when submitting the form. Example  suggest an answer array() count() array_flip() array_key_exists() array_merge() array_pop() array_push() array_unique() implode() explode() in_array()  suggest an answer nl2br() trim() str_replace() str_word_count() strlen() strpos() strstr() strtolower() strtoupper()  suggest an answer
  • 6. $target_dir = "upload/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); if(isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { echo "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { echo "File is not an image."; $uploadOk = 0; } }  Ques. 15. Explain the difference between session and cookies in PHP? Session and Cookies both functions are used to store information. But the main difference between a session and a cookie is that in case of session data is stored on the server but cookies stored data on the browsers. Sessions are more secure than cookies because session stored information on servers. We can also turn off Cookies from the browser. Example session_start(); //session variable $_SESSION['user'] = 'BestInterviewQuestion.com'; //destroyed the entire sessions session_destroy(); //Destroyed the session variable "user". unset($_SESSION['user']); Example of Cookies setcookie(name, value, expire, path,domain, secure, httponly); $cookie_uame = "user"; $cookie_uvalue= "Umesh Singh"; //set cookies for 1 hour time setcookie($cookie_uname, $cookie_uvalue, 3600, "/"); //expire cookies setcookie($cookie_uname,"",-3600);  suggest an answer
  • 7.  Ques. 16. What are headers in PHP? In PHP header() is used to send a raw HTTP header. It must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP Example : header(string,replace,http_response_code); 1. string: It is the required parameters. It specifies the header string to send. 2. replace: It is optional. It indicates whether the header should replace previous or add a second header. 3. http_response_code : It is optional. It forces the HTTP response code to the specified value  Ques. 17. What is the difference between file_get_contents() and file_put_contents() in PHP? PHP has multiple functions to handle files operations like read, write, create or delete a file or file contents. 1. file_put_contents():It is used to create a new file. Syntax : file_put_contents(file_name, contentstring, flag) If file_name doesn't exist, the file is created with the contentstring content. Else, the existing file is override, unless the FILE_APPEND flag is set. 2. file_get_contents(): It is used to read the contents of a text file. file_get_contents($filename);  Ques. 18. In PHP, how to redirect from one page to another page? With the heal of the header(), we can redirect from one page to another in PHP. Syntax : header('location:index.php');  Ques. 19. What is the meaning of "enctype= multipart/form-data" ? HTML forms provide three methods of encoding. multipart/form-data This is used to upload files to the server. It means no characters will be encoded. So It is used when a form requires binary data, like the contents of a file, to be uploaded.  Ques. 20. What is the role of the .htaccess file in php? The .htaccess file is a type of configuration file for use on web servers running the Apache Web Server software. It is used to alter the configuration of our Apache Server software to enable or disable additional functionality that the Apache Web Server software has to offer.  suggest an answer  suggest an answer  suggest an answer  suggest an answer application/x-www-form-urlencoded (the default) multipart/form-data text/plain  suggest an answer  suggest an answer
  • 8.  Ques. 21. How to add comments in PHP? In PHP comments are two types. 01. Single line comments 02. Multi line comments 1. Single line comments: It is used comments a single line of code. It disables a line of PHP code. You have to add // or # before the system. 2. Multi line comments: It is used to comment large blocks of code or writing multiple line comments. You have to add /* before and */ after the system.  Ques. 22. Explain the difference between array_merge() and array_combine()? 1. array_combine(): It is used to creates a new array by using the key of one array as keys and using the value of another array as values. Example : $array1 = array('key1', 'key2', 'key3'); $array2 = array(('umesh', 'sonu', 'deepak'); $new_array = array_combine($array1, $array2); print_r($new_array); OUTPUT : Array([key1] => umesh[key2] => sonu[key2] =>deepak) 2. array_merge(): It merges one or more than one array such that the value of one array appended at the end of the first array. If the arrays have the same strings key, then the next value overrides the previous value for that key. Example : $array1 = array("one" => "java","two" => "sql"); $array2 = array("one" => "php","three" => "html","four"=>"Me"); $result = array_merge($array1, $array2); print_r($result); Array ( [one] => php [two] => sql [three] => html [four] => Me )  Ques. 23. How to get a total number of elements used in the array? We can use the count() or size() function to get the number of elements or values in an array in PHP. Example $element = array("sunday","monday","tuesday"); echo count($element ); echo sizeof($element );  Ques. 24. What is the difference between public, protected and private? PHP has three access modifiers such as public, private and protected.  suggest an answer  suggest an answer  suggest an answer public scope of this variable or function is available from anywhere, other classes and instances of the object. private scope of this variable or function is available in its class only. protected scope of this variable or function is available in all classes that extend the current class including the parent class.  suggest an answer
  • 9.  Ques. 25. What is the difference between implode() and explode() in php? explode() function breaks a string into an array, but the implode() function returns a series from the elements of an array. Example : $arr = array("1","2","3","4","5"); $str = implode("-",$arr); OUTPUT 1-2-3-4-5 $array2 = "My name is umesh"; $a = explode(" ",$array2 ); print_r ($a); OUTPUT $a = Array ("My", "name", "is", "umesh");  Ques. 26. What is the difference server side and browser side validation? We need to add validation rules while making web forms. It is used because we need to take inputs from the user in the right way like we need the right email address in the email input field. Some time user did not enter the correct address as we aspect. That's why we need validation. Validations can be applied on the server side or the client side. Server Side Validation In the Server Side Validation, the input submitted by the user is being sent to the server and validated using one of the server- side scripting languages like ASP.Net, PHP, etc. Client Side Validation In the Client Side Validation, we can provide a better user experience by responding quickly at the browser level.  Ques. 27. How to create and destroy cookies in PHP? A cookie is a small file that stores on user's browsers. It is used to store users information. We can create and retrieve cookie values in PHP. A cookie can be created with the setcookie() function in PHP. Example  suggest an answer  suggest an answer
  • 10. Create Cookie $cookie_name = "username"; $cookie_value = "Umesh Singh"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day Update Cookie $cookie_name = "username"; $cookie_value = "Alex Porter"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); Delete Cookie setcookie("username", "", time() - 3600);  Ques. 28. What is the difference between fopen() and fclose()? These both are PHP inbuilt function which is used to open & close a file which is pointed file pointer. S.no fopen() fclose() 1. This method is used to open a file in PHP. This method is used to close a file in PHP. It returns true or false on success or failure. 2. $myfile = fopen("index.php", "r") or die("Unable to open file!"); $myfile = fopen("index.php", "r");  Ques. 29. What is the difference between php 5 and php 7? There are differences between php5 and php7. On our website you will find industy's best PHP interview questions for 5 year experience.  Ques. 30. How to get last inserted id after insert data from a table in mysql?  suggest an answer  suggest an answer PHP 5 is released 28 August 2014 but PHP 7 released on 3 December 2015 It is one of the advantages of the new PHP 7 is the compelling improvement of performance. Improved Error Handling Supports 64-bit windows systems Anonymous Class New Operators  suggest an answer
  • 11. mysql_insert_id() is used to get last insert id. It is used after insert data query. It will work when id is enabled as AUTO INCREMENT  Ques. 31. How to remove HTML tags from data in PHP? With the help of strip_tags() we can removed html tags from data in PHP. The strip_tags() function strips a string from HTML, XML, and PHP tags. strip_tags(string,allow) First parameter is required. It specifies the string to check. The second parameter is optional. It specifies allowable tags. Mention tags will not be removed  Ques. 32. What is str_replace()? It is used to replaces some characters with some other characters in a string. Suppose, we want to Replace the characters "Umesh" in the string "Umesh Singh" with "Sonu" echo str_replace("Umesh","Sonu","Umesh Singh");  Ques. 33. What is substr() in PHP? and how it is used? It is used to extract a part of the string. It allows three parameters or arguments out of which two are mandatory, and one is optional echo substr("Hello world",6); It will return first six characters from a given string.  Ques. 34. What the use of var_dump()? It is used to dump information about one or more variables. It displays structured data such as the type and value of the given variable. Example: $var_name1=12; int(12);  Ques. 35. What is the use of nl2br() in PHP? It is used to inserts HTML line breaks ( <br /> or <br /> ) in front of each newline (n) in a string.  Ques. 36. Please explain the difference between $var and $$var? $$var is known as reference variable where $var is a normal variable.  Ques. 37. Please explain the difference between isset() and empty()? 1. isset(): It returns TRUE if the variable exists and has a value other than NULL. It means variables assigned a "", 0, "0", or FALSE are set. 2. empty(): It checks to see if a variable is empty. It interpreted as: "" (an empty string).  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer
  • 12. isset($var) && !empty($var) will be equals to !empty($var)  Ques. 38. Explain the difference between mysql_fetch_array(), mysql_fetch_object()? 1. mysql_fetch_object: It returns the result from the database as objects. In this field can be accessed as $result->name 2. mysql_fetch_array: It returns result as an array. In this field can be accessed as $result->[name]  Ques. 39. What are the __construct() and __destruct() methods in a PHP class? Constructor and a Destructor both are special functions which are automatically called when an object is created and destroyed. Example class Animal { public $name = "Hello"; public function __construct($name) { echo "Live HERE"; $this->name = $name; } public function __destruct() { echo "Destroy here"; } } $animal = new Animal("Bob"); echo "My Name is : " . $animal->name;  Ques. 40. How to get complete current page URL in PHP? $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";  Ques. 41. How to include a file code in different files in PHP? For including a file into another PHP file we can use various function like include(), include_once(), require(), require_once(). Example  suggest an answer  suggest an answer  suggest an answer  suggest an answer
  • 13. <?php require('footer.php') ?>  Ques. 42. List some sorting functions in PHP? The items of an array can be sorted by various methods.  Ques. 43. How can we enable error reporting in PHP? The error_reporting() function defines which errors are reported.We can modify these errors in php.ini. You can use these given function directly in php file. error_reporting(E_ALL); ini_set('display_errors', '1');  Ques. 44. What are magic methods? Magic methods are unique names, starts with two underscores, which denote means which will be triggered in response to particular PHP events. The magic methods available in PHP are given below:-  Ques. 45. What are traits? How is it used in PHP? A trait is a group of various methods that reuse in single inheritance. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of processes. Example  suggest an answer sort() - it sort arrays in ascending order rsort() - it sort arrays in descending order asort() - it sorts associative arrays in ascending order, according to the value ksort() - it sort associative arrays in ascending order, according to the key arsort() - it sorts associative arrays in descending order, according to the value krsort() - it sorts associative arrays in descending order, according to the key  suggest an answer  suggest an answer __construct() __destruct() __call() __get() __unset() __autoload() __set() __isset()  suggest an answer
  • 14. trait HelloWorld { use Hello, World; } class MyWorld { use HelloWorld; } $world = new MyWorld(); echo $world->sayHello() . " " . $world->sayWorld(); //Hello World  Ques. 46. What is inheritance in PHP? How many types of inheritance supports PHP? Inheritance has three types, are given below. But PHP supports only single inheritance, where only one class can be derived from a single parent class. We can do the same thing like multiple inheritance by using interfaces.  Ques. 47. How to download files from an external server with code in PHP? We can do it by various methods, If you have allow_url_fopen set to true: Example  suggest an answer Single inheritance Multiple inheritance Multilevel inheritance  suggest an answer We can download images or files from an external server with cURL() But in this case, curl has been enabled on both servers We can also do it by file_put_contents()
  • 15. $ch = curl_init(); $source = "http://abc.com/logo.jpg"; curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($ch); curl_close ($ch); $destination = "/images/newlogo.jpg"; $file = fopen($destination, "w+"); fputs($file, $data); fclose($file); /*-------This is another way to do it-------*/ $url = 'http://abc.com/logo.jpg'; $img = '/images/flower.jpg'; file_put_contents($img, file_get_contents($url));  Ques. 48. What are the different MySQL database engines? With PHP 5.6+ "InnoDB" is treated by default database storage engine. Before that MyISAM defaulted storage engine.  Ques. 49. What is the difference between = , == and ===? These all are PHP Operators. = is used to assign value in variables. It is also called assignments operators. == is used to check if the benefits of the two operands are equal or not. === is used checks the values as well as its data type. We have covered all levels of PHP interview question for fresher - basic and advanced levels.  Ques. 50. How to make a class in PHP? We can define a class with keyword "class" followed by the name of the class. Example : class phpClass { public function test() { echo 'Test'; }  suggest an answer InnoDB CSV MEMORY ARCHIVE MyISAM  suggest an answer  suggest an answer
  • 16. }  Ques. 51. What are the final class and final method? Its properties cannot be declared final, only classes and methods may be declared as final. If the class or method defined as final, then it cannot be extended. Example class childClassname extends parentClassname { protected $numPages; public function __construct($autor, $pages) { $this->_autor = $autor; $this->numPages = $pages; } final public function PageCount() { return $this->numPages; } }  Ques. 52. Please write a query to find the 2nd highest salary of an employee from the employee table? You can use this SELECT MAX(salary) FROM employee WHERE Salary NOT IN ( SELECT Max(Salary) FROM employee); Query to find the 2nd highest salary of the employee.  Ques. 53. What is the role of a limit in a MySQL query? It is used with the SELECT statement to restrict the number of rows in the result set. Limit accepts one or two arguments which are offset and count. The syntax of limit is a SELECT name, salary FROM employee LIMIT 1, 2  Ques. 54. How to get a total number of rows available in the table? COUNT(*) is used to count the number of rows in the table. SELECT COUNT(*) FROM BestPageTable;  Ques. 55. What is MVC? MVC is an application in PHP which separates the application data and model from the view. The full form of MVC is Model, View & Controller. The controller is used to interacting between the models and views.  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer
  • 17. Example: Laravel, YII, etc  Ques. 56. What is a composer? It is an application package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software. The composer is developed by Nils Adermann and Jordi Boggiano, who continue to lead the project. The composer is easy to use, and installation can be done through the command line. It can be directly downloaded from https://getcomposer.org/download  Ques. 57. What is the use of $_SERVER["PHP_SELF"] variable? It is used to get the name and path of current page/file.  Ques. 58. What is the use of @ in Php? It suppresses error messages. It’s not a good habit to use @ because it can cause massive debugging headaches because it will even contain critical errors  Ques. 59. What is namespace in PHP? Namespace allows us to use the same function or class name in different parts of the same program without causing a name collision. Example Namespace MyAPP; function output() { echo 'IOS!'; } namespace MyNeWAPP; function output(){ echo 'RSS!'; }  Ques. 60. How we get browser details of clients machine? With the help of $_SERVER['HTTP_USER_AGENT']  Ques. 61. What is the use of cURL()? It is a PHP library and a command line tool that helps us to send files and also download data over HTTP and FTP. It also  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer  suggest an answer
  • 18. supports proxies, and you can transfer data over SSL connections. Example Using cURL function module to fetch the abc.in homepage $ch = curl_init("https://www.bestinterviewquestion.com/"); $fp = fopen("index.php", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp);  Ques. 62. Write a program to display Reverse of any number? $num = 12345; $revnum = 0; while ($num > 1) { $rem = $num % 10; $revnum = ($revnum * 10) + $rem; $num = ($num / 10); } echo "Reverse number of 12345 is: $revnum";  Ques. 63. How to check whether a number is Prime or not? Example  suggest an answer  suggest an answer
  • 19. function IsPrime($n) { for($x=2; $x<$n; $x++) { if($n %$x ==0) { return 0; } } return 1; } $a = IsPrime(3); if ($a==0) echo 'Its not Prime Number.....'."n"; else echo 'It is Prime Number..'."n";  Ques. 64. Write a program to display a table of any given number? Example function getTableOfGivenNumber($number) { for($i=1 ; $i<=10 ; $i++) { echo $i*$number; } } getTableOfGivenNumber(5);  Ques. 65. How to write a program to make chess?  suggest an answer  suggest an answer  suggest an answer
  • 20.  Ques. 66. What is the difference between abstract class and interface in php? Many differences occur between the interface and abstract class in php.  Ques. 67. What are aggregate functions in MySQL? The aggregate function performs a calculation on a set of values and returns a single value. It ignores NULL values when it performs calculation except for the COUNT function. MySQL provides various aggregate functions that include AVG(), COUNT(), SUM(), MIN(), MAX().  Ques. 68. What is the difference between MyISAM and InnoDB? There are lots of differences between both storage engines. Some are given below:- This is a good question concerning PHP programming interview questions and answers for freshers.  Ques. 69. What is SQL injection?  Ques. 70. How to redirect https to HTTP URL through .htaccess? Place this code in your htaccess file. RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]  Ques. 71. What is the Apache? Apache HTTP server is the most popular open source web server. Apache has been in use since the year 1995. It powers more websites than any other product. Abstract methods can declare with protected, public, private. But in case of Interface methods stated with the public. Abstract classes can have method stubs, constants, members, and defined processes, but interfaces can only have constants and methods stubs. Abstract classes do not support multiple inheritance but interface support this. Abstract classes can contain constructors, but the interface does not support constructors.  suggest an answer  suggest an answer MyISAM supports Table-level Locking, but InnoDB supports Row-level Locking MyISAM designed for the need of speed but InnoDB designed for maximum performance when processing a high volume of data MyISAM does not support foreign keys, but InnoDB support foreign keys MyISAM supports full-text search, but InnoDB does not support this MyISAM does not support the transaction, but InnoDB supports transaction You cannot commit and rollback with MyISAM, but You can determine and rollback with InnoDB MyISAM stores its data, tables, and indexes in disk space using separate three different files, but InnoDB stores its indexes and tables in a tablespace  suggest an answer  suggest an answer  suggest an answer
  • 21.  Ques. 72. What is the difference between Apache and Tomcat? Both used to deploy your Java Servlets and JSPs. Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.  Ques. 73. What is the best way to avoid email sent through PHP getting into the spam folder?  Ques. 74. What is PEAR in PHP? It stands for PHP Extension and Application Repository. It is that the next revolution in PHP. It is used to install packages automatically.  Ques. 75. What is the difference between REST and Soap?  Ques. 76. How to make database connection in PHP? Example  suggest an answer  suggest an answer Sending mail using the PHP mail function with minimum parameters we tend to should use headers like MIME-version, Content-type, reply address, from address, etc. to avoid this case Did not use correct SMTP mail script like PHPmailer. Should not use website link in mail content.  suggest an answer  suggest an answer SOAP represent for Simple Object Access Protocol, and REST stands for Representation State Transfer. SOAP is a protocol and Rest is an architectural style. SOAP permits XML data format only but REST permits different data format such as Plain text, HTML, XML, JSON, etc SOAP requires more bandwidth and resource than REST so avoid to use SOAP where bandwidth is minimal.  suggest an answer
  • 22. $servername = "your hostname"; $username = "your database username"; $password = "your database password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die("Not Connected: " . $conn->connect_error); } echo "Connected";  suggest an answer Most Searched Questions LARAVEL INTERVIEW QUESTIONS 60 WORDPRESS INTERVIEW QUESTIONS 50 YII INTERVIEW QUESTIONS 27 REACT JS INTERVIEW QUESTIONS 31 JQUERY INTERVIEW QUESTIONS 50 ANGULARJS INTERVIEW QUESTIONS 30 HTML INTERVIEW QUESTIONS 33 CSS INTERVIEW QUESTIONS 35 NODE JS INTERVIEW QUESTIONS 56 C++ INTERVIEW QUESTIONS 28
  • 23. JAVA INTERVIEW QUESTIONS 49 ASP.NET INTERVIEW QUESTIONS 18 GO PROGRAMMING INTERVIEW QUESTIONS 34 PYTHON INTERVIEW QUESTIONS 30 SQL INTERVIEW QUESTIONS 25 MYSQL INTERVIEW QUESTIONS 38 MONGODB INTERVIEW QUESTIONS 23 PHP INTERVIEW QUESTIONS 76 BOOTSTRAP INTERVIEW QUESTIONS 27 IOS INTERVIEW QUESTIONS 65 Latest Blogs Features of laravel 5.7 over other versions
  • 24. 1 month ago 5 Reasons PHP is the Most Preferred Language 1 month ago Frameworks vs. CMS – Which One is Better and Why? 1 month ago
  • 25. Why Bootstrap is the Best UI Design Tool 1 month ago Featured Category Development Frontend /UI Database Web Design Mobile App Government HR Testing / QA Networking Digital Marketing CRM GIT PHP SEO SEM PHP Interview Questions PHP Interview Questions Laravel Interview Questions Wordpress Interview Questions symfony Interview Questions Drupal Interview Questions YII Interview Questions Opencart Interview Questions CakePHP Interview Questions OOPS Interview Questions Popular Interview Questions Node JS Interview Questions GO Interview Questions Python Interview Questions
  • 26. HTML Interview Questions CSS Interview Questions React JS Interview Questions Angular JS Interview Questions Mysql Interview Questions Common Interview Questions Our Categories Website development HR Interview Questions SEO Interview Questions Database Interview Questions Frontend / UI Interview Question Testing / QA Interview Questions Mobile App Interview Questions Designing Interview Questions Govt. jobs Interview Questions Newsletter Stay update with our latest interview questions Home About Us Blog Contact Privacy Policy  Your Email Address Copyright © 2018 All rights reserved | Application is made by Sharptechsolution     