xref: /php-src/Zend/tests/bug70662.phpt (revision 220880ad)
1--TEST--
2Bug #70662: Duplicate array key via undefined index error handler
3--FILE--
4<?php
5
6$a = [];
7set_error_handler(function() use(&$a) {
8    $a['b'] = 2;
9});
10$a['b'] += 1;
11var_dump($a);
12
13?>
14--EXPECT--
15array(1) {
16  ["b"]=>
17  int(2)
18}
19