PHP Question Bank
PHP Question Bank
Unit 1:
1. Expand PHP. Who developed PHP?
2. Explain the features of PHP.
3. Explain the process of installation on windows using XAMPP.
4. Explain the installation & configuration of PHP.
5. Write the syntax for PHP.
6. Explain embedding PHP code in web page with an example.
7. What are white spaces in PHP?
8. What are the different ways of writing comments in PHP?
9. What are the different ways of sending data in PHP?
10. Define data type in PHP. Explain the types of data types in PHP.
11. What are variables? How to create variables?
12. Write the different ways to create constants.
13. Explain types of data types in PHP with an example for each.
14. Define string operators.
15. Briefly explain operator in PHP.
16. What are keywords? Give few examples for keywords.
17. Explain the scope of variables in PHP.
18. What are scalar data type, compound data type and special data type?
19. What is type conversion? Explain the types of type conversions.
20. How to create global variables?
21. What is expression?
22. What is type operator?
Unit 2:
1. List the conditional statements used in PHP.
2. Write the syntax for all the conditional and looping statements.
3. Define array.
4. Mention the types of arrays.
5. Define multidimensional arrays.
6. What is include() and require() in PHP?
7. Explain the different steps for creating arrays.
8. Briefly explain the types of array
9. Differentiate between indexed and associative arrays.
10. Explain creation, accessing, modification and display of multidimensional array with an
example.
11. Explain implicit and explicit casting in PHP.
12. Explain any 10 array functions.
Unit 3:
1. Define function.
2. Write the syntax for creating a function.
3. Explain the built-in functions
4. Explain user defined functions
5. What is anonymous function.
6. What is variable scope in function?
7. Define recursive function
8. Write few file system functions.
9. What are database functions?
10. Give some examples for mathematical functions.
11. What are formatting dates?
12. Explain the type of functions with an example.
13. Briefly explain date and time functions with an example.
14. How to create and invoke user defined functions with an example
15. Explain about library functions
16. What are strings?
17. What is heredoc and nowdoc?
18. List few string functions.
19. What is explode() and implode() in PHP?
20. Explain string case function with an example.
21. Write a php program to implement different string functions.
22. List all the string functions.
23. Explain substr() and str_replace() with an example.
24. How to create and declare a string?
25. How to perform string concatenation?
Unit 4:
1. Define class and object.
2. Define constructor and destructor.
3. Write the syntax for constructor and destructor in php.
4. What is overloading?
5. Define inheritance. List the types of inheritance.
6. What is the use of final keyword?
7. What are visibility modifiers?
8. Explain the class and object in PHP.
9. Write a php program for implementation of class and object.
10. Explain how to create and access a class and object.
11. Explain the properties of object with an example.
12. Explain object method with an example.
13. Describe the overloading and types in PHP.
14. Mention few magic methods.
15. Describe inheritance and its types with an example,
16. Explain the constructor with an example.
17. What is form handling?
18. List few form elements in PHP.
19. What are the text inputs?
20. Explain <fieldset> and <legend>
21. Explain the different types of input tags.
22. Explain radio and checkbox button with an example.
23. List different methods of form.
24. Explain HTML form with a program.
25. Describe how to handle HTML form data in PHP.
26. Describe MYSQL datatypes.
27. What is database?
28. Mention few database terms.
Unit 5:
1. How to access MySQL?
2. What are the query execution function?
3. What are the functions used in data base connection?
4. What are the functions used in transaction?
5. What are error handling functions?
6. Explain how to use the MySQL client.
7. Describe how to use phpMyAdmin.
8. Briefly explain about the PHP MySQL function.
9. Explain how establish a connection to MySQL?
10. Briefly explain about how to run a simple query with example.
11. Explain how to select the database.
12. Explain how to retrieve query results.
13. Explain the steps to update the records with PHP.
14. How to count the returned records?