2
ZE2 ArrayAccess::offsetGet ambiguties
5
class object implements ArrayAccess {
7
public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
9
function offsetExists($index) {
10
echo __METHOD__ . "($index)\n";
11
return array_key_exists($index, $this->a);
13
function offsetGet($index) {
14
echo __METHOD__ . "($index)\n";
23
return $this->a[$index];
25
function offsetSet($index, $newval) {
26
echo __METHOD__ . "($index,$newval)\n";
30
return $this->a[$index] = $newval;
32
function offsetUnset($index) {
33
echo __METHOD__ . "($index)\n";
34
unset($this->a[$index]);
54
Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_004.php on line %d