php-src/Zend/tests/bug72347.phpt
Ayesh Karunaratne b8e380ab09 Update deprecation message for incompatible float to int conversion
Updates the deprecation message for implicit incompatible float to int conversion from:

```
Implicit conversion from non-compatible float %.*H to int in %s on line %d
```

to

```
Implicit conversion from float %.*H to int loses precision in %s on line %d
```

Related: #6661
2021-06-07 14:36:11 +02:00

19 lines
332 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());
?>
--EXPECTF--
Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
float(1.5)
int(1)