Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Dec 3, 2021
1 parent 4a5c05a commit 8d7d87c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Zend/tests/objects_034.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--TEST--
Array object clobbering by user error handler
--FILE--
<?php
class A {
}

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

0 comments on commit 8d7d87c

Please sign in to comment.