PHP Interview questions 2019

PHP Interview Questions 2019

Q1. Is multiple inheritance supported in PHP?

PHP Interview Questions 2019 PHP supports only single inheritance. It means that a class can be extended from only one single class using the keyword ‘extended’.

Q2. What is the use of count() function in PHP?

The PHP count() function is used to count total elements in the array.

Q3. Explain some of the PHP array functions?

There are many array functions in PHP:

  • array()
  • count()
  • sort()
  • array_reverse()
  • array_search()
Q4. How to create and destroy the session in PHP?

The session_start() function is used to start the session. It starts new or resumes the current session. It returns the current session if the session is created already. If the session is not available, it creates and returns new sessions.

Q5. How to upload image in PHP?

The move_uploaded_file() function is used to upload image in PHP.
Syntax: bool move_uploaded_file ( string $filename , string $destination )

More details…

PHP Interview Questions and Answers

Q6. Explain some of the PHP string functions?

There are many string functions in PHP:

  • strtolower()
  • strtoupper()
  • strrev()
  • strlen()

More details…

Q7. Difference between isset() function and empty() function?

The isset() function check whether a variable is set or not.
The empty() function check whether a variable is empty.

More details…

Q8. What is the difference between in final method and final class?

Final method can not be overridden and final class can not be extended with another class.

Q9. Do you know about the Content Management Systems (CMS) in PHP?

WordPress: WordPress is a free and open-source content management system (CMS) based on PHP & MySQL. It includes a plug-in architecture and template system. It is mostly connected with blogging, forums and online store type platform.

Joomla: Joomla is a free and open-source content management system (CMS) for distributing web content. It is based on a model-view-controller web application framework that can be used independently of the CMS.

Magento: Magento is an open source platform for E-commerce website, which is valuable for online business. Magento provides the functionality of creating the online store.

Q10. What is MVC in PHP?

The Model is responsible to manage the data; it stores and retrieves entities used by an application, usually from a database, and contains the logic such as fetch & update data etc. implemented by the application.

The View is responsible to display the data provided by the model. End user GUI through which user can interact with application i.e. HTML, CSS.

The Controller receives a request from the user, invokes the model to perform the requested operations and sends the data to the view. It contain business logic and provide a link between model and view.

More details…

Thanks for the reading post. I hope you like and understand the post. If you have any doubt regarding this post please comment below.

More Related Post

Thanks for the reading post. I hope you like and understand the post. If you have any doubt regarding this post please comment below.

Leave a comment

Your email address will not be published. Required fields are marked *

0 0 0
FOLLOW ON