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’;

A.
false
B.
true
Answer is B
0
0
Sorry … it return false… so Correct is A
4
0