PHP is a server-side scripting language which is used to develop dynamic web pages or web applications. There are various PHP frame works upon which a candidate should have proper command in order to get placed in top MNC’s. The famous frame workes include FuelPHP, CakePHP, FlightPHP, Symfony, Laravel and many more. Being so much in demand these days, there are lots of job opportunities in this field. These are some of the PHP interview questions and answers that have been asked in many companies. Let’s see the list of top PHP interview questions.
Q1. What is PHP?
Ans. PHP stands for Hypertext Preprocessor. It is an open source, interpreted and object-oriented scripting language that is used to develop web applications.
Q2. Who is known as the father of PHP?
Ans. RasmusLerdorf is known as father of PHP.
Q3. What was the old name of PHP?
Ans. Earlier it was known by Personal Home Page.
Q4. Which programming language does PHP resemble?
Ans. PHP syntax resembles Perl and C programming language.
Q5.What is the main difference between PHP 4 and PHP 5?
Ans. PHP 5 presents many additional OOP (Object Oriented Programming) features and uses Zend Engine 2.
Q6. How can PHP and HTML interact?
Ans. PHP is a server-side scripting language. Browser (client) understands HTML language. So, whenever a user request for a web page to the server; the server response and execute the process data to the browser in HTML format.
Q7. What are the popular Content Management Systems (CMS) in PHP?
- Drupal etc.
Q8. What are the popular frameworks in PHP?
- Yii 2
- Zend Framework etc.
Q9. What is the difference between GET and POST methods?
Ans. Using GET method, we can send only limited amount of data because the data is sent in the header but in case of POST method, a large amount of data can be sent because data is sent in the body.
Q10. What is the use of “echo” in PHP?
Ans.It is used to print a data in the webpage. For example: <?php echo ‘Print Data’; ?> , The following code print the text on the webpage.
Q11.How to find the length of a string?
Ans. strlen() function used to find the length of a string.
Q12.How can we change the value of a constant?
Ans.We cannot change the value of a constant.
Once going through these questions, it can help you in cracking the interview.
Are you looking fora job opportunityin Muscat? If yes, then you can visit on Monster Gulf. It is the leading job portal which helps candidates to the perfect job. All you need to do is to just register yourself on the portal and upload an update resume on the same. One can find the job by simply entering the job title, location, experience, and keywords. While searching for a job, always use the advance search feature because it helps in finding the most suitable jobs.
Pragyan Prabha is a passionate content writer who writes articles related to jobs and career opportunities in various profile. When not writing, she loves exploring the tourist attractions.