mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
For x ? y : z style structures, the live range starts at z, but may also hold the value of y. Make sure that the refcounting check takes this into account, by checking the type of a potential phi user.
20 lines
336 B
PHP
20 lines
336 B
PHP
--TEST--
|
|
Missing live range if part of phi
|
|
--FILE--
|
|
<?php
|
|
function doThrow() {
|
|
throw new Exception("Test");
|
|
}
|
|
function test($k) {
|
|
// The 0 gives the QM_ASSIGN a non-refcounted type.
|
|
$res[$k ? $k : 0] = doThrow();
|
|
}
|
|
try {
|
|
test(new stdClass);
|
|
} catch (Exception $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Test
|