diff --git a/NEWS b/NEWS index 548349b4063..4798f3e407b 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ PHP NEWS configured). (nielsdos) . Fixed bug GH-19719 (Allow empty statements before declare(strict_types)). (nielsdos) + . Casting floats that are not representable as ints now emits a warning. + (Girgias) - Curl: . Fix cloning of CURLOPT_POSTFIELDS when using the clone operator instead diff --git a/UPGRADING b/UPGRADING index e0974f16e4a..c84a373d857 100644 --- a/UPGRADING +++ b/UPGRADING @@ -55,6 +55,10 @@ PHP 8.5 UPGRADE NOTES . Destructing non-array values (other than NULL) using [] or list() now emits a warning. RFC: https://wiki.php.net/rfc/warnings-php-8-5#destructuring_non-array_values + . A warning is now emitted when casting floats (or strings that look like + floats) to int if they cannot be represented as one. This affects explicit + int casts and implicit int casts. + RFC: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int - BZ2: . bzcompress() now throws a ValueError when $block_size is not between