1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/bug79947.phpt
Marcos Marcolin 641fe23e3a Improve illegal offset error messages (#10504)
Co-authored-by: Marcos Marcolin <marcos@ixcsoft.com.br>
2023-02-08 12:11:41 +00:00

18 lines
301 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--
Cannot access offset of type array on array
array(0) {
}