Looks like no one added any tags here yet for you.
15
$x=15;
Echo $x--;
What is the output?
13
14
15
16
new
Operator for Object instantiation
new
()
@
start
\t
Escape Sequence for horizontal tab
\r
\h
\t
\n
10
$x=10;
Echo $x++;
What is the output?
10
12
11
13
30
$a=10;$
b=20;
If($a<$b)
{echo $a+$b;}
Else
{echo $a-$b;}
Question: what is the output of the code
-10
40
30
20
NA
Associativity for Object instantiation
NA
Left
Middle
Right
Switch
Another code for condition
Get
Set
Pick
Switch
NA
Associativity for object instantiation
Right
NA
Left
Middle
/=
Division-assignment symbol
/=
/
//
==/
while(expr){statement}
Syntax for while statement
while(statement){expr}
expr(while){statement}
while(expr){statement}
(expr)while{statement}
Valid
If($a == $b){}
Valid
Invalid
/
Symbol for division
=/
?
/
\
#
Symbol use for Perl style single line comment
#
@
^
$
Continue
statement causes execution of the current loop iteration to end and commence at the beginning of the next iteration.
If
Continue
Goto
Break
for(expr1;expr2;expr3){statement}
Syntax for for statement
for(expr1;expr2;expr3){statement}
for(expr1){statement}expr2
for(statement){expr}
for{expr1,expr2}(statement)
<=
Symbol for less than or equal to
<=
<
>
>=
For
Which of the following is not a conditional statement?
Else
Elseif
If
For
Nested if
What do you call a condition inside of a condition?
If any
If if
Inside if
Nested if
& ^ |
Operator for Bitwise AND, bitwise XOR, bitwise OR
& ^ |
,,
&&||
?:
Left
Associativity for Bitwise AND, bitwise XOR, bitwise OR
Right
Left
Middle
NA
@
Associativity for error suppression
%
@
^
#
False
There is always default inside of the switch
False
True
Invalid
$m=3;
switch($m){
case 1: echo “May”; break;
case 2: echo “June”; break;
case 3: echo “July”; break;
default: echo “invalid”; break;
}
What is the output if $m is one?
May
Invalid
June
July
True
break statement is placed within the code of a loop to cause the program to break out of the loop statement.
False
True
Left
Associativity for Addition, subtraction, concatenation
Middle
Right
NA
Left
30
$u=30;
do{
echo $y++;
}while($u<31);
What is the output?
31
32
30
33
If(expression){statement..}
Syntax for if statement
Expression…if(statement)
If(expression){statement..}
(expression)if{statement…}
Statement…if(expression)
do{statement}while(expr);
Syntax for do… while statement
do{statement}while(expr);
do(expr)while{statement}
while(do)expr{statement}
while{statement}do(expr)
=
Operator for assignment operators
–
>
=
+
hooray
$v=70;
if($v<=70) {
echo “hooray”;
} else {
Echo “hello”;
}
What is the output?
invalid
hooray
blank
hello
Left
Associativity for Division, multiplication, modulus
Middle
Right
Left
NA
7
$x=4;
$x++;
Echo $x+2
What is the output?
8
9
7
6
33
$u=30;
do{
echo $y++;
}while($u<31);
What is the output if $y=33?
32
30
31
33
True
Do is a looping stamen
True
False
>=
Symbol for greater than or equal to
<
>=
>
<=
Rank A
$s=90;
if($s==80 && $s<90) {
echo “Rank B”;
} else if($s>90){
echo “Rank A”;
}else{
echo “Rank C”;
}
What is the output if $s=1000?
Rank C
Rank A
Rank B
Error
*
Symbol for multiplication
X
=*
**
*
===
Symbol for identical to
!=
=
==
===
&&
Symbol for AND operator
$$
||
&&
%%
12
$x=0;
for($i=1;$i<5;$i++){$x+=$i;}
echo $x;
What is the output if $x=2
10
12
9
15
Goto
statement is used to jump to other section of the program to support labels.
If
Goto
Break
Continue
[]
Operator for index enclosure
()
++
<<
[]
Left
Associativity for Boolean AND, Boolean OR
Right
NA
Left
Middle
0
$x=0;
for($i=1;$i<5;$i++){$i+=$i;}
echo $x;
What is the output?
0
12
5
10
+
Symbol for addition
+
=+
–
++
()
Operator for Expression subgrouping
@
[]
()
/
Operator
symbol that specifies a particular action in an expression.
Associativity
Precedence
Purpose
Operator
11
$x=10;
Echo ++$x;
What is the output?
11
14
13
12
Welcome to PHP
<?php
Echo ‘Welcome to PHP’;
?>
What is the output
Welcome to php
‘welcome to php’
Welcome to PHP
“welcome to php”
!
Symbol for NOT
#
@
!
$
hello
$v=70;
if($v<=70) {
echo “hooray”;
} else {
Echo “hello”;
}
What is the output if the value of $v is 100?
hooray
invalid
hello
blank
==
Symbol for equal to
==
===
=
!=
--
Decrement symbol
+
++
--
-
Statement
Complete the syntax
If(expression){
__________;
}
Statement
Condition
Expression
Value
True
You can use many if condition in one php script
True
False
<
Symbol for less than
>=
>
<
<=
True
$ inside “ and “ are interpreted as variables thus it will display the value rather than the string that starts with $.
True
False
2
if(expression) {
statement…
} else {
statement
}
How many condition/s
1
3
4
2
||
Symbol for OR operatpr
%%
&&
||
$$
Right
Associativity for assignment operators
Middle
NA
Left
Right
True
elseif is one of the conditional statements in php
Group of answer choices
True
False
NA
Associativity for Expression subgrouping
NA
Left
Right
Middle
+=
Addition-assignment symbol
+=
+
++
==+
%
Symbol for modulus
$
^
M
%
*=
Multiplication-assignment symbol
*=
==*
*
**
5 4 3 2 1
$a=10;
while($a>0){ echo $a--.” ”;
}
What is the output if $a is 5?
4 3 2 1
5 4 3 2 1
1 2 3 4
1 2 3 4 5
switch($category)
Syntax for Switch
swt($cat)
$Cat($switch)
$switch($category)
switch($category)
Rank C
$s=90;
if($s==80 && $s<90) {
echo “Rank B”;
} else if($s>90){
echo “Rank A”;
}else{
Echo “Rank C”;
}
What is the output if $s=50?
Rank C
Rank A
Error
Rank B
($a == 12) ? 5 : 1
Ternary format
($a == 12) ? 5 : 1
(5 == f)::
($a == 10)?5
(10 == $a):?1
++
Increment symbol
-
++
+
--
10 9 8 7 6 5 4 3 2 1
$a=10;
while($a>0){ echo $a--.” ”;
}
What is the output?
10 9 8 7 6 5 4 3 2 1
9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
>
Symbol for greater than
<
>
>=
<=
True
You can create multiple statements inside of an condition
False
True
>
if(7 __ 4)
{ echo “true”;}
Else
{ echo “false”;}
What is missing code to make the statements true?
!=
=
<
>