nerdexam
Zend

200-530 · Question #425

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 B. 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

  • AThe script will throw an error message.
  • Btrue
  • Ctrue false
  • Dfalse

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    84% (21)
  • C
    8% (2)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice