bug72347.phpt 332 B

123456789101112131415161718
  1. --TEST--
  2. Bug #72347 (VERIFY_RETURN type casts visible in finally)
  3. --FILE--
  4. <?php
  5. function test() : int {
  6. $d = 1.5;
  7. try {
  8. return $d;
  9. } finally {
  10. var_dump($d);
  11. }
  12. }
  13. var_dump(test());
  14. ?>
  15. --EXPECTF--
  16. Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
  17. float(1.5)
  18. int(1)