mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
19 lines
236 B
Plaintext
19 lines
236 B
Plaintext
|
--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)
|
||
|
}
|