nerdexam
Zend

200-550 · Question #41

What is the output of the following code? $a = array('a', 'b'=>'c'); echo property_exists((object) $a, 'a')?'true':'false'; echo '-'; echo property_exists((object) $a, 'b')?'true':'false';

The correct answer is B. false-true. See the full explanation below for the reasoning.

Question

What is the output of the following code? $a = array('a', 'b'=>'c'); echo property_exists((object) $a, 'a')?'true':'false'; echo '-'; echo property_exists((object) $a, 'b')?'true':'false';

Options

  • Afalse-false
  • Bfalse-true
  • Ctrue-false
  • Dtrue-true

How the community answered

(30 responses)
  • A
    10% (3)
  • B
    83% (25)
  • C
    3% (1)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice