PHP Interview Questions.
As PHP language
is in trend nowadays that’s why all web developing companies give priority to
those candidates who are good in PHP language. These companies hire the desired
candidates who have a good knowledge of HTML language as well as PHP language
& ask them the following PHP Interview Questions.
Frequently
Asked PHP Interview Questions
What is PHP?
PHP is an open source scripting
language which is widely used nowadays. The full form of PHP is Hypertext
Pre-processor.
What is a PHP File?
Those files which contain text,
HTML, JavaScript code, and PHP code are known as PHP files. The default file
extension of PHP files is “.php”.
What is the current version of PHP,
Apache, MySQL?
The current version of PHP is php
5.1.2, the current version of Apache is Apache 2.1 and the current version of
MySQL is MySQL 5.1.
What are the uses of PHP language?
The main uses of PHP language are
following:-
1. PHP language is used to generate
dynamic page content.
2. Through PHP language user can
create, open, read, write, and close files on the server.
3. User can collect form data
through PHP language.
4. You can send and receive cookies
with the help of PHP language.
5. User can add, delete and modify
data in your database through PHP language.
Why we use PHP over other languages?
We use PHP language over other
languages beacuse PHP language runs on different platforms like Windows, Linux,
Unix, Mac OS X, etc. It is also compatible on all servers like Apache, IIS,
etc.
In PHP language, what does a special
set of tags <?= and ?> do?
The use of special set of tags in
PHP language is to display the output of the program directly to the browser.
What is the common difference b/w
include and require in PHP language?
In PHP language the functions
include and require are used to handle the failures in a program. The common
diffrence between include and require in PHP language is that in case of
include function, if the file of any program is not found by include() then it
shows a warning to the user but side by side the execution of the script will
continue. In case of require function in PHP language, if the file of any
program is not found by the rquire() then it shows a fatal error to the user
and also it halt the execution of the script.