PHP interview questions

PHP is still on top of the scripting language battle. The latest version of PHP (7+) is more mature and people are using it for making large scale application. The most strong usage example of PHP is Facebook and the giant widely popular CMS WordPress.

Facebook started with PHP and they are still using PHP in some areas. WordPress built with PHP and still using PHP. It is the most popular CMS. World’s 30% if total websites are written in WordPress. That describes the usage of PHP a lot.

As the learning curve of PHP is small, the availability of PHP developer everywhere. It is relatively easy to write PHP code. PHP developers often write code without following any pattern or standard and causes vulnerability in the application. The scripting language PHP itself is great. It is the developer that made all the bad impressions for PHP. The super cool Laravel PHP framework is an example of good code using PHP.

Very often we see php developer open position. For any PHP developer interview it is essential to know the basic of PHP. We should plan to read the PHP manual before any PHP developer interview. Following are some useful PHP developer interview questions:

What will be the output of the following line?

   echo const MY_FILEPATH = dirname(dirname(__FILE__)) . '/heres-my-file.php';

How to remove empty array elements?

print_r(array_filter($array));
Share