xref: /PHP-8.3/Zend/tests/bug74084.phpt (revision cdaf3503)
1--TEST--
2Bug #74084 (Out of bound read - zend_mm_alloc_small)
3--INI--
4error_reporting=0
5--FILE--
6<?php
7$$A += $$B['a'] = &$$C;
8unset($$A);
9try {
10    $$A -= $$B['a'] = &$$C;
11} catch (Error $e) {
12    echo $e->getMessage(), "\n";
13}
14unset($$A);
15try {
16    $$A *= $$B['a'] = &$$C;
17} catch (Error $e) {
18    echo $e->getMessage(), "\n";
19}
20unset($$A);
21try {
22    $$A /= $$B['a'] = &$$C;
23} catch (Error $e) {
24    echo $e->getMessage(), "\n";
25}
26unset($$A);
27try {
28    $$A **= $$B['a'] = &$$C;
29} catch (Error $e) {
30    echo $e->getMessage(), "\n";
31}
32?>
33--EXPECT--
34Unsupported operand types: array - array
35Unsupported operand types: array * array
36Unsupported operand types: array / array
37Unsupported operand types: array ** array
38