PHP

A vibrant and engaging illustration of a computer screen displaying PHP code, surrounded by related programming icons like cookies, error codes, and databases, on a colorful background.

Test Your PHP Knowledge

Welcome to the ultimate PHP quiz! Challenge yourself with 10 carefully crafted questions that cover key concepts in PHP programming.

Enhance your skills and deepen your understanding of:

  • PHP functions
  • Boolean contexts
  • NULL values
  • File handling
  • Cookies and sessions
10 Questions2 MinutesCreated by CodingWizard42
Q 1 - What does PHP stand for?
A - Personal Hypertext Processor
B - Hypertext Preprocessor
C - Private Home Page
D - None of these
Q 2 - Which of the following is correct about determine the "truth" of any value not already of the Boolean type?
A - If the value is a number, it is false if exactly equal to zero and true otherwise.
B - If the value is a string, it is false if the string is empty (has zero characters) or is the string "0", and is true otherwise.
C - Values of type NULL are always false.
D - All of the above.
Q 3 - Which of the following is correct about NULL?
A - A variable that has been assigned NULL evaluates to FALSE in a Boolean context.
B - A variable that has been assigned NULL returns FALSE when tested with IsSet() function.
C - Both of the above.
D - None of the above.
Q 4 - Which of the following function is used to locate a string within a string?
A - search()
B - locate()
C - strpos()
D - None of the above.
Q 5 - Which of the following variable is used for the PHP script name?
A - $_PHP_SELF
B - $SELF
C - $PHP
D - None of the above.
Q 6 - If there is any problem in loading a file then the require() function generates a warning but the script will continue execution.
A - true
B - false
Q 7 - Which of the following is used to set cookies?
A - setcookie() function
B - $_COOKIE variable
C - $HTTP_COOKIE_VARS variable
D - isset() function
Q 8 - Which of the following provides the error code associated with this file upload?
A - $_FILES['file']['error']
B - $_FILES['file']['name']
C - $_FILES['file']['size']
D - $_FILES['file']['type']
Q 9 - Which of the following method of Exception class returns source filename?
A - getMessage()
B - getCode()
C - getFile()
D - getLine()
Q 10 - Which of the following method returns a formatted string representing a date?
A - time()
B - getdate()
C - date()
D - None of the above
{"name":"PHP", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the ultimate PHP quiz! Challenge yourself with 10 carefully crafted questions that cover key concepts in PHP programming.Enhance your skills and deepen your understanding of:PHP functionsBoolean contextsNULL valuesFile handlingCookies and sessions","img":"https:/images/course2.png"}
Powered by: Quiz Maker