summaryrefslogtreecommitdiff
path: root/Zend/tests/bug70662.phpt
blob: 2bda8141bab4f04d0b2729beaaaa05c3908e186e (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(1)
}