PHP Interview Questions and Answers
Here you can find PHP Interview Questions and Answers.
Why PHP Interview Questions and Answers Required?
In this PHP Interview Questions and Answers section you can learn and practice PHP Interview Questions and Answers to improve your skills in order to face technical
inerview by IT companies. By Practicing these interview questions, you can easily crack any PHP interview.
Where can I get PHP Interview Questions and Answers?
AllIndiaExams provides you lots PHP Interview Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students,
freshers can download PHP Interview Questions and Answers as PDF files and eBooks.
How to solve these PHP Interview Questions and Answers?
You no need to worry, we have given lots of PHP Interview Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the PHP
technical interview.
PHP Interview Questions and Answers
What is PHP?
PHP stand for Hypertext Preprocessor.
PHP is a Server Side Scripting Language.
PHP is a Open Source Software.
PHP free to download and use.
PHP scripts are executed on server.
PHP supports many databases such as MYSQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.,
PHP development began in 1994 when the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called "Personal Home Page Tools" to
maintain his personal homepage. Marco Tabini is the funder an publisher of PHP|architech.
PHP Interview Questions and Answers
What are the method available in form submitting?
GET and POST.
PHP Interview Questions and Answers
What are the differences between GET and POST methods in form submitting?
On the server side, the main difference between GET and POST is where the submitted is stored.
The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method.
On the browser side, the difference is that data submitted by the GET method will be displayed in the browser’s address field.
Data submitted by the POST method will not be displayed anywhere on the browser.
GET method is mostly used for submitting a small amount and less sensitive data.
POST method is mostly used for submitting a large amount or sensitive data.
PHP Interview Questions and Answers
How can we submit from without a submit button?
We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit(); function to submit the
form.
PHP Interview Questions and Answers
How can we get the browser properties using php?
< ?php
echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$browser = get_browser(null, true);
print_r($browser);
? >
PHP Interview Questions and Answers
What is a Session?
A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.
Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.
PHP Interview Questions and Answers
How can we register the variables into a session?
< ?php
session_register($ur_session_var);
? >
PHP Interview Questions and Answers
How do you destroy a particular or all Sessions?
< ?php
session_start();
// store session data
$_SESSION['views']=1;
unset($_SESSION['views']); // If you wish to delete some session data, you can use the unset()
session_destroy(); // You can also completely destroy the session by calling the session_destroy() function. session_destroy() will reset your session and you will lose all your
stored session data.
? >
PHP Interview Questions and Answers
How many ways we can pass the variable through the navigation between the pages?
Register the variable into the session
Pass the variable as a cookie
Pass the variable as part of the URL
PHP Interview Questions and Answers
What are the different functions in sorting an array?
asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()