php-src/Zend/tests/bug72347.phpt
Dmitry Stogov 3b8cb2119b Fixed bug #72347 (VERIFY_RETURN type casts visible in finally)
Fixed bug #72216 (Return by reference with finally is not memory safe)
Fixed bug #72215 (Wrong return value if var modified in finally)
2016-07-13 15:08:28 +03:00

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)