PHP (Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

What is PHP?
  • PHP is an acronym for "PHP Hypertext Preprocessor"
  • PHP is a widely-used, open source scripting language
  • PHP scripts are executed on the server
  • PHP costs nothing, it is free to download and use
Top PHP Interview QA

Top 20 PHP Interview Questions with Answers for freshers and experienced are below are below:


1. PHP stand for?
Hypertext Preprocessor

2. What is PHP?
PHP is a server side scripting language commonly used for dynamic web applications development.

3. Who is the father of php?
Rasmus Lerdorf

4. What is PEAR in php?
Is a framework and stand for PEAR(PHP Extension and Application Repository)  and repository for reusable PHP components.

5. Methods name for passing data in form submit?
GET and POST


6. MIME stand for?
MIME - Multi-purpose Internet Mail Extensions.

7. How to print "Hello world" in php file?
with the help of "echo", we can do it
Example: <?php echo 'hello world'; ?>

8. Explain AMP Module.
AMP stand for Apache-MySQL and PHP and it's relationship of PHP, Apache web server and MYSQL).

9. Write PHP script syntax.A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here
?>

10. Types of Comments in PHP?
// This is a single-line comment

# This is also a single-line comment

/*
multiple-lines
comment
block
*/


11. PHP Case Sensitivity?
No

12. Write rules for naming variable in PHP.
Rules for PHP variables:
A variable starts with the $ sign,
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
Variable names are case-sensitive ($age and $AGE are two different variables)

13. Different between echo and print Statements?
echo and print are used to output data to the screen.
echo has no return value while print has a return value of 1 so it can be used in expressions.
echo can take multiple parameters (although such usage is rare) while print can take one argument.
echo is marginally faster than print.


14. List all data types of PHP?
PHP supports the following data types
String
Integer
Float (floating point numbers - also called double)
Boolean
Array
Object
NULL
Resource

More question coming soon.. we are updating our list of ques and answer... :)
keep wait and watch for few days.

Post a Comment

 
Top