php-8.0.30-src/Zend/tests/bug79947.phpt

18 lines
277 B
PHP

--TEST--
Bug #79947: Memory leak on invalid offset type in compound assignment
--FILE--
<?php
$array = [];
$key = [];
try {
$array[$key] += [$key];
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
var_dump($array);
?>
--EXPECT--
Illegal offset type
array(0) {
}