mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
cdaf35033d
By mentioning the operand types. We can do that now, as the original operand types now remain available. Closes GH-5330.
34 lines
425 B
PHP
34 lines
425 B
PHP
--TEST--
|
|
Memory leak on ** with result==op1 array
|
|
--FILE--
|
|
<?php
|
|
|
|
$x = [0];
|
|
try {
|
|
$x **= 1;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
var_dump($x);
|
|
|
|
$x = [0];
|
|
try {
|
|
$x **= $x;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
var_dump($x);
|
|
|
|
?>
|
|
--EXPECT--
|
|
Unsupported operand types: array ** int
|
|
array(1) {
|
|
[0]=>
|
|
int(0)
|
|
}
|
|
Unsupported operand types: array ** array
|
|
array(1) {
|
|
[0]=>
|
|
int(0)
|
|
}
|