The PHP syntax is most similar to:
AnswerWhat is the correct way to end a PHP statement?
AnswerAll variables in PHP start with which symbol?
AnswerHow do you write "Hello World" in PHP
AnswerPHP server scripts are surrounded by delimiters, which?
AnswerWhich statement about the code below is correct?
class A {}
class B {}
class C extends A, B {}
Answer
What gets printed?
$str = 'a\\b\n';
echo $str;
Answer
What will be printed by the below code?
$a = 1;
{
$a = 2;
}
echo $a, "\n";
Answer
What will be printed?
$a = array();
if ($a[1]) null;
echo count($a), "\n";
Answer
What gets printed?
class MyException extends Exception {}
try {
throw new MyException('Oops!');
} catch (Exception $e) {
echo "Caught Exception\n";
} catch (MyException $e) {
echo "Caught MyException\n";
}
Answer
What will be printed?
$a = array(
null => 'a',
true => 'b',
false => 'c',
0 => 'd',
1 => 'e',
'' => 'f'
);
echo count($a), "\n";
Answer
What will be printed?
$var = 'a';
$VAR = 'b';
echo "$var$VAR";
Answer
Which of the following is NOT a valid PHP comparison operator?
AnswerWhat will be printed?
if ('2' == '02') {
echo 'true';
} else {
echo 'false';
}
Answer
What will be the value of $var below?
$var = true ? '1' : false ? '2' : '3';
Answer
What gets printed?
<?php
$RESULT = 11 + 011 + 0x11;
echo "$RESULT";
?>
Answer
What will be printed?
if (null === false) {
echo 'true';
} else {
echo 'false';
}
Answer
What will be printed?
$a = array();
if ($a == null) {
echo 'true';
} else {
echo 'false';
}
Answer
Which of the following is NOT a magic predefined constant?
AnswerHow do we access the value of 'd' later?
$a = array(
'a',
3 => 'b',
1 => 'c',
'd'
);
Answer
© 2017 QuizBucket.org