Zend
200-550 · Question #40
What is the output of the following code? class Bar { private $a = 'b'; public $c = 'd'; } $x = (array) new Bar(); echo array_key_exists('a', $x) ? 'true' : 'false'; echo '-'; echo…
The correct answer is B. false-true. See the full explanation below for the reasoning.
Question
What is the output of the following code? class Bar { private $a = 'b'; public $c = 'd'; } $x = (array) new Bar(); echo array_key_exists('a', $x) ? 'true' : 'false'; echo '-'; echo array_key_exists('c', $x) ? 'true' : 'false';
Options
- Afalse-false
- Bfalse-true
- Ctrue-false
- Dtrue-true
How the community answered
(18 responses)- A6% (1)
- B72% (13)
- C17% (3)
- D6% (1)
Community Discussion
No community discussion yet for this question.