nerdexam
Zend

200-530 · Question #546

You work as a Web Developer for Remote Inc. What will be the output when you try to run the script below? <?php $b = false; if($b = true) print("true"); else print("false"); ?>

The correct answer is A. true. See the full explanation below for the reasoning.

Question

You work as a Web Developer for Remote Inc. What will be the output when you try to run the script below? <?php $b = false; if($b = true) print("true"); else print("false"); ?>

Options

  • Atrue
  • Bfalse
  • Ctrue false
  • DThe script will throw an error message.

How the community answered

(28 responses)
  • A
    75% (21)
  • B
    4% (1)
  • C
    7% (2)
  • D
    14% (4)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice