Font size
WorksheetsPHP QUIZ
Total questions: 20
Worksheet time: 11mins
What does PHP stand for?
Personal Home Page
Hyper Text Preprocessor
Pretext Hyper Text Preprocessor
Preprocessor Home Page
PHP is a___________ scripting language.
Serverside
Clientside
Middleside
None of the Above
We can use __________ to comment a single line in PHP
/
//
#
/* */
In an associative array index or key will be represented by
String
Value
Boolean
None
To destroy the session we use
session_unset()
session_ start()
session_destroy()
None
Which of the following is a ternary operator?
&
=
+=
?:
var_dump gives _________ of given variable or expression
data type
value
result
None
PHP script is executed on
ISP Computer
Server Computer
Client Computer
None of these
Which of the following variables is not a predefined variables?
$_get
$_post
$_ask
$_request
Which of the following printing construct/function accepts multiple parameters?
echo
printf
None of the above
What will be the output of the following code?
$a=10
Echo 'value of a=$a'
Value of a=10
Value of a=$a
Undefined
Syntax Error
Which function add the new element at the end of an array?
push()
pop()
stack()
none
Which of the following is used for printing in PHP?
echo()
print()
Both A & B
display()
If we need variable values to remain save even outside function then we have to use
Static keyword
local keyword
global keyword
None of these
Who is the father of PHP?
Rasmus Ledorf
William Makepiece
Drek Kolkevi
List Barely
Which of the following PHP statements will store 111 in variable num?
int $ num=111
int num=111
$num=111
111=$num
Which of the following method sends input to a script via URL?
GET
POST
BOTH
None
What is the output of the program?
<?PHP
$num="1"
$num2="2"
print $num+$num2
?>
3
1+2
Error
12
Which of the following are valid PHP data types?
resource
null
Boolean
All of the above
Write the output of the following?
<?PHP
function display()
{
static $a=10;
$a++;
return $a;
}
echo display();
echodisplay();
?>
10
11
11
12
12
12
11
11
