Skip to content

Commit 8d7d87c

Browse files
committed
Add test
1 parent 4a5c05a commit 8d7d87c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Zend/tests/objects_034.phpt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
Array object clobbering by user error handler
3+
--FILE--
4+
<?php
5+
class A {
6+
}
7+
8+
set_error_handler(function () {
9+
$GLOBALS['a'] = null;
10+
});
11+
12+
$a = new A;
13+
$a[$c] = 'x' ;
14+
var_dump($a);
15+
16+
$a = new A;
17+
$a[$c] .= 'x' ;
18+
var_dump($a);
19+
20+
$a = new A;
21+
$a[$c][$c] = 'x' ;
22+
var_dump($a);
23+
?>
24+
--EXPECT--
25+
NULL
26+
NULL
27+
NULL

0 commit comments

Comments
 (0)