1. What is the name of the Script Engine in PHP?
Zend Engine 2
2. What are the uses of count() function in PHP?
This function is used in counting all the elements in the array.
3. How can we include the file to the PHP page?
We could include the file to the PHP page using a require() or include() function with the file path as their parameter.
4. What are the Data Types in PHP?
- Under Compound types
- Under Scalar types
- Under Special types
5. Mention the frameworks in PHP?
- Yii 2
- Zend Framework
6. How do you stop the execution of the PHP Script?
By using Exit(); function.
7. What are the Consonants in PHP?
-FILE- -LINE- -CLASS- -METHOD- -FUNCTION-
8. What are the uses of PHP?
- It can gather the data from files, save those data to a file and also we can send those data through email.
- One could delete, add, and modify elements within the database by using PHP.
- We can access the cookies variables.
9. Define PHP 5?
This is a Server Script language. It is used in making dynamic and interactive web pages. Besides, it is a free and useful alternative for its competitor like Microsoft’s ASP.
10. What are the Magic Functions that are available in the PHP?
_destruct() _call() _get() _set() _isset() _unset() _construct() _sleep() _clone() _invoke() _to string _wakeup() _set-state() _debuginfo()
11. How do you stop executing a PHP Script?
12. What is the session time of PHP?
It will last for 24 minutes(1440 seconds).
13. Mention the uses of PHP and MySQL?
PHP: It is the scripting language and used in Web Development.
MySQL: MySQl is a Relational Database Management System.
14. Name the variable’s scope in PHP?
- Local Scope
- Global Scope
- Static Scope
15. How would you redirect the page in PHP?
header(“Location:HomePage.php”); These are the Basic PHP and MySQL Interview Questions that are asked to a fresher and Experienced candidate in an Interview.
16. What is the one main distinction between PHP4 and PHP5
PHP5 can present various additional Object-Oriented Programming (OOP) features compared to PHP4.
17. Which method is used in sending the Simple Mail Transfer Protocol using PHP?
mail($EmailAddress, “Subject”, $MessageBody);.
18. What are the types of Array in PHP?
- Indexed Array
- Associative Array
- Multi-Dimensional Array
19. What are the features of PHP7?
- Spaceship operator
- Generator delegation
- Anonymous classes
- Closure:: call method
- Group use declaration
- Scalar type declarations
- Return type declarations
- Null coalescing operator (??)
- Constant arrays using define()
- Generator return expressions.
20. List the Content Management Systems in PHP?
21. How many columns we can create for the index?
For a Standard Table, we can create 16 indexed columns.
22. From the below cURL which of them is not a valid parameter PHP?
CURLOPT_RETURNTRANSFER is not the valid cURL.
23. Which one is not a valid method in PHP XML DOM?
geElementById() is not a valid method in the PHP XML DOM.
24. What is the role of a LAMP in PHP?
It is the combination of Linux, Apache, PHP, and MySQL.
25. What is the meaning of Self in PHP?
It is the Self keyword that is used in accessing the static methods and properties.
26. What is the Scope level in PHP?
27. What are the various types of operators available in PHP?
- Union All
28. List the encryption functions that are available in PHP?
29. Explain Composer in PHP?
It is the package manager for the application level in PHP. Composer permits you to declare libraries depending on the project and also they will allow you to update.
30. What are the various types of print functions that are available in PHP?
30. Differentiate between PHP and Java
|Deployment area||Server-Side Scripting language||General Purpose Programming language|
|Supports Rich APIs||No||Yes|
|Language Type||Dynamically typed||Statically typed.|
31. Elucidate polymorphism in PHP?
It describe patterns in object oriented programming. Where the classes have multiple functionality when sharing the common interface.
32. Mention the use of die in PHP?
This function prints the message, exists in the current script.
- See More : Java interview Q&A
- See More : Special machine Q&A
- See More : Vibration galvanometer Q&A
- See More : Object oriented programming Q&A