Which interfaces could class C implement in order to allow each statement in the following code to work? (Choose 2)$obj = new C();foreach ($obj as $x => $y) {echo $x, $y;}
Answer(s): A,C
What is the output of the following code?class Foo Implements ArrayAccess {function offsetExists($k) { return true;}function offsetGet($k) {return 'a';}function offsetSet($k, $v) {}function offsetUnset($k) {}}$x = new Foo();echo array_key_exists('foo', $x)?'true':'false';
Answer(s): B
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';
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';
Assuming UTF-8 encoding, what is the value of $count?$count = strlen($data);
Answer(s): C
Post your Comments and Discuss Zend 200-550 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the 200-550 content, but please register or login to continue.