MidtermReviewer
MidtermReviewer
MidtermReviewer
WIT5M1
IT APC 3 LAB
MIDTERM REVIEWER
a) @
b) #
c) $
d) $
$x = "Hello";
$$x = "World";
a) Hello World
b) World Hello
c) $x ${$x}
d) Error
5. In PHP, how can you define a multidimensional array?
a) 0b10101
b) 123
c) 0xFF
a) Hello PHP
b) GREETING
a) Integer
b) String
c) Array
d) Float
10. What is the result of the following code?
$foo = "bar";
$$foo = "baz";
echo $foo;
echo $bar;
a) barbaz
b) foobaz
c) Error
d) bazbar
a) $x = 0; var_dump($x);
b) $x = "Hello"; var_dump($x);
c) $x = true; var_dump($x);
d) $x = false; var_dump($x);
a) By using dynamic_var()
a) 123
b) 0x1A
c) 0011
d) 1.23
a) An array of integers
d) An error
$a = "good";
$$a = "morning";
a) good $$a
b) good good
c) good morning
d) Error
a) 3THREE
b) CONSTANT1
c) $CONSTANT
d) -CONSTANT
19. Which data type will the function gettype() return for the following?
$x = 10.25;
echo gettype($x);
a) float
b) integer
c) double
d) array