php-src/Zend/tests/bug74084.phpt
Nikita Popov cdaf35033d Improve "unsupported operands" error
By mentioning the operand types. We can do that now, as the
original operand types now remain available.

Closes GH-5330.
2020-04-01 11:26:43 +02:00

38 lines
715 B
PHP

--TEST--
Bug #74084 (Out of bound read - zend_mm_alloc_small)
--INI--
error_reporting=0
--FILE--
<?php
$$A += $$B['a'] = &$$C;
unset($$A);
try {
$$A -= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A *= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A /= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
unset($$A);
try {
$$A **= $$B['a'] = &$$C;
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Unsupported operand types: array - array
Unsupported operand types: array * array
Unsupported operand types: array / array
Unsupported operand types: array ** array