nerdexam
National_Instruments

200-500 · Question #226

You run the following PHP script: <?php define ("USER", "Maria"); $USER="John"; print "Welcome ".USER; ?> What will be the output?

The correct answer is D. Welcome Maria. See the full explanation below for the reasoning.

Question

You run the following PHP script:

<?php define ("USER", "Maria"); $USER="John"; print "Welcome ".USER; ?> What will be the output?

Options

  • AWelcome John
  • BScript will through an error.
  • CWelcome USER
  • DWelcome Maria

How the community answered

(52 responses)
  • A
    6% (3)
  • B
    8% (4)
  • C
    4% (2)
  • D
    83% (43)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice