PHP Interview Questions

There is given PHP interview questions and answers that has been asked in many companies. Let’s see the list of top PHP interview questions.
1) What is PHP?
PHP stands for Hypertext Preprocessor. It is an open source server-side scripting language which is widely used for web development. It supports many databases like MySQL, Oracle, Sybase, Solid, PostgreSQL, generic ODBC etc.
2) What is PEAR in PHP?
PEAR is a framework and repository for reusable PHP components. PEAR stands for PHP Extension and Application Repository. It contains all types of PHP code snippets and libraries.
It also provides a command line interface to install “packages” automatically.

3) Who is known as the father of PHP?
Rasmus Lerdorf
4) What was the old name of PHP?
Personal Home Page.
5) Explain the difference b/w static and dynamic websites?
In static websites, content can’t be changed after running the script. You can’t change anything in the site. It is predefined.
In dynamic websites, content of script can be changed at the run time. Its content is regenerated every time a user visit or reload. Google, yahoo and every search engine is the example of dynamic website.

6) What is the name of scripting engine in PHP?
The scripting engine that powers PHP is called Zend Engine 2.
7) Explain the difference between PHP4 and PHP5.
PHP4 doesn’t support oops concept and uses Zend Engine 1.
PHP5 supports oops concept and uses Zend Engine 2.

8) What are the popular Content Management Systems (CMS) in PHP?
WordPress
Joomla
Magento
Drupal etc.

9) What are the popular frameworks in PHP?
CakePHP
CodeIgniter
Yii 2
Symfony
Zend Framework etc.

10) Which programming language does PHP resemble to?
PHP has borrowed its syntax from Perl and C.
11) List some of the features of PHP7.
Scalar type declarations
Return type declarations
Null coalescing operator (??)
Spaceship operator
Constant arrays using define()
Anonymous classes
Closure::call method
Group use declaration
Generator return expressions
Generator delegation
Space ship operator

Leave a Reply