<<< Previous question <<< Question ID#0465.md >>> Next question >>>
What is the output of the following code?
function print_conditional() {
static $x;
if ($x++ == 1) echo "many";
echo "good";
echo "things";
return $x;
}
$x = 1;
print_conditional();
$x++;
print_conditional();
- A) goodthingsmanygoodthings
- B) manygoodthingsmanygoodthings
- C) manygoodthings
- D) goodthingsgoodthings
Answer
Answer: A