Font size
WorksheetsPHP Basics
Total questions: 15
Worksheet time: 7mins
PHP stands for
Hypertext processor
Homepage processor
Hypertext preprocessor
PHP is a____________side scripting language
server
browser
client
The file extension for PHP files is __________.
.html
.php
.css
.java
Which tag is used for php
<?php
?>
<?php
>
<php
?>
<php
/php>
Which of the following is used to end a statement in PHP?
. (dot)
; (semicolon)
! (exclamation)
/ (slash)
Which of the following is not true?
PHP can be used to develop web applications.
PHP makes a website dynamic
PHP can not be embedded into html.
None of these
All variables in PHP start with which symbol?
?
$
!
=
How do we display the values of the variable "name" ?
$name;
include $name;
echo $name;
echo $name
Which of the following is the correct way of defining a variable in PHP?
$variable name = value;
$variable_name = value;
$variable_name = value
$variable name as value;
How can we use variable in php?
$a=5;
var a=5;
int a=5;
$a=5
Find the output
<?php
$x = 5;
$y= 10;
echo $x;
echo $y;
?>
105
510
5
10
10
5
$a = 4 ; $b = 6; $c = $a + $b; What is the value of variable "c" ?
6
8
10
None
The * operator belongs to which category of operators?
Arithmetic operator
Logical operator
Comparison operator
Conditional operator
_______ is a concatenation operator in php
+ (plus)
+=
. (dot)
, (comma)
What is the Output
<?php
$color=red;
echo "$color";
?>
red
$color
No answer
Error
