2019-09-26 11:45:45 +00:00
|
|
|
--TEST--
|
|
|
|
Memory leak on ** with result==op1 array
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$x = [0];
|
2019-10-29 12:05:02 +00:00
|
|
|
try {
|
|
|
|
$x **= 1;
|
|
|
|
} catch (Error $e) {
|
|
|
|
echo $e->getMessage(), "\n";
|
|
|
|
}
|
2019-09-26 11:45:45 +00:00
|
|
|
var_dump($x);
|
|
|
|
|
|
|
|
$x = [0];
|
2019-10-29 12:05:02 +00:00
|
|
|
try {
|
|
|
|
$x **= $x;
|
|
|
|
} catch (Error $e) {
|
|
|
|
echo $e->getMessage(), "\n";
|
|
|
|
}
|
2019-09-26 11:45:45 +00:00
|
|
|
var_dump($x);
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
2020-04-01 08:05:26 +00:00
|
|
|
Unsupported operand types: array ** int
|
2019-10-29 12:05:02 +00:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
int(0)
|
|
|
|
}
|
2020-04-01 08:05:26 +00:00
|
|
|
Unsupported operand types: array ** array
|
2019-10-29 12:05:02 +00:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
int(0)
|
|
|
|
}
|