Which of the following is used to comment out a single line in PHP?
//
/* */
#
--
What is the correct way to concatenate two strings in PHP?
$string1 . $string2
$string1 + $string2
$string1 & $string2
$string1 : $string2
Which of the following is NOT a valid PHP data type?
String
Boolean
Float
Character
What is the output of the following code?\n\n$x = 10;\n$y = 5;\necho $x % $y;
0
1
2
0.5
What is the correct way to define a constant in PHP?
Define('CONSTANT_NAME', value)
Const CONSTANT_NAME = value;
$CONSTANT_NAME = value;
Constant(CONSTANT_NAME, value);
Which of the following is used to redirect a user to a different page in PHP?
Header('Location: newpage.php')
Redirect('newpage.php')
Location.href = 'newpage.php'
Window.location.replace('newpage.php')
What is the purpose of the isset() function in PHP?
To check if a variable is set and not null
To define a new variable
To unset a variable
To check if a variable is empty
What is the correct way to include an external PHP file?
Include 'filename.php';
Require 'filename.php';
Import 'filename.php';
Load 'filename.php';
Which of the following is NOT a valid comparison operator in PHP?
==
<=
<>
><
What is the output of the following code?\n\n$x = 5;\n$y = 10;\nif ($x > $y) {\necho 'x is greater than y';\n} else {\necho 'x is less than or equal to y';\n}
X is less than or equal to y
X is greater than y
X is equal to y
No output
Name of candidate
Roll No
Which of the following is NOT a valid way to comment out multiple lines in PHP?
/* ... */
// ...
# ...
What is the purpose of the 'echo' statement in PHP?
To output content to the browser
To declare a variable
To include a file
To perform a mathematical operation
What is the correct syntax to define a function in PHP?
Which of the following is used to include a PHP file within another PHP file?
Include
Require
Import
Load
What is the purpose of the '$_GET' superglobal in PHP?
To retrieve data sent through the URL
To store session variables
To access form data submitted using POST method
To handle file uploads
{"name":"What does PHP stand for?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What does PHP stand for?, Which of the following is NOT a feature of PHP?, What is the correct syntax to start a PHP script?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}