summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70662.phpt
blob: ab540c9d16e5fb11eff62ccda00841c6d1acb170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #70662: Duplicate array key via undefined index error handler
--FILE--
<?php

$a = [];
set_error_handler(function() use(&$a) {
    $a['b'] = 2;
});
$a['b'] += 1;
var_dump($a);

?>
--EXPECT--
array(1) {
  ["b"]=>
  int(2)
}