Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 580 Bytes

0405.md

File metadata and controls

37 lines (31 loc) · 580 Bytes

What is the output of the following script?

$name = 'Judy';
$str1 = <<<EOF
Hello $name
EOF;
$str2 = <<<'EOF'
Goodbye $name;
EOF;

if (strpos($str1$name) === false) {
     echo 'a';
} else {
     echo 'b';
}

if (strpos($str2$name) === false) {
     echo 'c';
} else {
     echo 'd';
}
  • A) bc
  • B) Syntax Error
  • C) ac
  • D) bd
Answer

Answer: A