xref: /PHP-8.1/Zend/tests/bug79947.phpt (revision 2d087210)
1--TEST--
2Bug #79947: Memory leak on invalid offset type in compound assignment
3--FILE--
4<?php
5$array = [];
6$key = [];
7try {
8    $array[$key] += [$key];
9} catch (TypeError $e) {
10    echo $e->getMessage(), "\n";
11}
12var_dump($array);
13?>
14--EXPECT--
15Illegal offset type
16array(0) {
17}
18