PrepAway - Latest Free Exam Questions & Answers

What is the output of the following code?

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

PrepAway - Latest Free Exam Questions & Answers

A.
false

B.
true

2 Comments on “What is the output of the following code?


Leave a Reply

Your email address will not be published. Required fields are marked *