mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
3b8cb2119b
Fixed bug #72216 (Return by reference with finally is not memory safe) Fixed bug #72215 (Wrong return value if var modified in finally)
18 lines
244 B
PHP
18 lines
244 B
PHP
--TEST--
|
|
Bug #72347 (VERIFY_RETURN type casts visible in finally)
|
|
--FILE--
|
|
<?php
|
|
function test() : int {
|
|
$d = 1.5;
|
|
try {
|
|
return $d;
|
|
} finally {
|
|
var_dump($d);
|
|
}
|
|
}
|
|
var_dump(test());
|
|
?>
|
|
--EXPECT--
|
|
float(1.5)
|
|
int(1)
|