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)- A10% (3)
- B83% (25)
- C3% (1)
- D3% (1)
Community Discussion
No community discussion yet for this question.