xref: /PHP-8.0/Zend/tests/objects_035.phpt (revision cbc0b1af)
1--TEST--
2Array object clobbering by user error handler
3--FILE--
4<?php
5class A implements ArrayAccess {
6    public function &offsetGet($n) {
7    }
8    public function offsetSet($n, $v) {
9    }
10    public function offsetUnset($n) {
11    }
12    public function offsetExists($n) {
13    }
14}
15
16set_error_handler(function () {
17    $GLOBALS['a'] = null;
18});
19
20$a = new A;
21$a[$c];
22?>
23DONE
24--EXPECT--
25DONE
26