nerdexam
National_Instruments

200-500 · Question #232

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

(29 responses)
  • A
    72% (21)
  • B
    17% (5)
  • C
    7% (2)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice