nerdexam
Zend

200-530 · Question #39

You run the following PHP script: <?php function calc() { $x=10; $b=++$x; print($b); } ?> What will be the value of the variable b?

The correct answer is B. 11. See the full explanation below for the reasoning.

Question

You run the following PHP script: <?php function calc() { $x=10; $b=++$x; print($b); } ?> What will be the value of the variable b?

Exhibit

200-530 question #39 exhibit

Options

  • AThe script will throw an error message.
  • B11
  • C9
  • D10

How the community answered

(22 responses)
  • A
    14% (3)
  • B
    73% (16)
  • C
    5% (1)
  • D
    9% (2)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice