1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/Zend/tests/objects_034.phpt
2021-12-13 14:59:30 +03:00

36 lines
506 B
PHP

--TEST--
Array object clobbering by user error handler
--FILE--
<?php
class A implements ArrayAccess {
public function &offsetGet($n) {
}
public function offsetSet($n, $v) {
}
public function offsetUnset($n) {
}
public function offsetExists($n) {
}
}
set_error_handler(function () {
$GLOBALS['a'] = null;
});
$a = new A;
$a[$c] = 'x' ;
var_dump($a);
$a = new A;
$a[$c] .= 'x' ;
var_dump($a);
$a = new A;
$a[$c][$c] = 'x' ;
var_dump($a);
?>
--EXPECT--
NULL
NULL
NULL