PHP Basic Interview Questions

PHP Basic Interview Questions

 

E-siksha provides you basic level PHP Interview Questions with Answers for beginners.

 

Q1. What is PHP?


PHP stands for Hypertext Pre-processor, the language you write next to the server program that makes dynamic pages. PHP is extremely useful for creating dynamic and blogging websites. PHP is an open-source server-side scripting language.

Q2. Difference between the include() and require() functions?


include() function includes external files into PHP script if the file doesn't exist then include() return a warning and script execution are going to be continued.
require() function is analogous to the include function but they return a fatal error if the file doesn't exist and stop script execution.

 

Q3. Difference between GET and POST methods?

 

  • The GET method is employed to retrieve data, and therefore the POST method is employed to insert and update data.
  • The GET method can handle limited data but has no restrictions for the POST method.
  • PHP provides $_GET to access all the sent information using the GET method and $_POST to access all the sent information using the POST method.

 

Q4. What does PHP originally stand for?


      Personal Home Page or Hypertext pre-processor.

 

Q5. What are the common features of PHP?

 

Some Important Features: -

  • It's an open-source and server-side scripting language.
  • It creates both dynamic and static pages.
  • It is simple and easy to learn.
  • By using PHP, you can able to create blogging, social sites, e-commerce websites, and others.
  • Support by almost all hosting servers

 

Q6. Main differentiate between variables and constants in PHP?

A variable is used to store different types of information and data. Its value has been changed during execution. Constants are almost like PHP Variables but they have a fixed value that can’t change during the execution of the PHP script.

 

Learn More About PHP Constants and Variables.

 

Q7. What does isset() function?


       Isset() function check the variable is about or not. If a variable isn't set means the variable has no value.



Q8. Difference b/w static and dynamic websites?

 

The static website was quick and straightforward to develop. Requires web development expertise to update. Dynamic Website Less hassle to update. Does dynamic content help in search engines.

 

Q9. Popular frameworks in PHP?

 

Laravel June 2011
Symfony October 2005
CakePHP April 2005
CodeIgniter February 2006
Zend Founded in 1999

 

Q10. What is PHP basic syntax?

PHP basic syntax starts with <?php and ends with the ?>.

Learn More About PHP Syntax