php-src/Zend/tests/bug79947.phpt
Nikita Popov 74c4381806 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79947
2020-08-10 10:13:34 +02:00

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) {
}