php-src/Zend/tests/bitwise_not_precision_exception.phpt
2021-07-01 13:21:41 +02:00

16 lines
318 B
PHP

--TEST--
Promoting float precision warning to exception in bitwise_not
--FILE--
<?php
set_error_handler(function($_, $msg) {
throw new Exception($msg);
});
try {
var_dump(~INF);
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Implicit conversion from float INF to int loses precision