#fdiv
function PR
The new fdiv
function does something similar as the fmod
and intdiv
functions, which allows for division by 0. Instead of errors you’ll get INF
, -INF
or NAN
, depending on the case.
#Type annotations for internal functions EXTERNALS
Lots of people pitched in to add proper type annotations to all internal functions. This was a long standing issue, and finally solvable with all the changes made to PHP in previous versions. This means that internal functions and methods will have complete type information in reflection.
#Variable syntax tweaks RFC
From the RFC: “the Uniform Variable Syntax RFC resolved a number of inconsistencies in PHP’s variable syntax. This RFC intends to address a small handful of cases that were overlooked.”
#Breaking changes
As mentioned before: this is a major update and thus there will be breaking changes. The best thing to do is take a look at the full list of breaking changes over at the UPGRADING document.
Many of these breaking changes have been deprecated in previous 7.* versions though, so if you’ve been staying up-to-date over the years, it shouldn’t be all that hard to upgrade to PHP 8.
#Consistent type errors RFC
User-defined functions in PHP will already throw TypeErrors
, but internal functions did not, they rather emitted warnings and returned null
. As of PHP 8 the behaviour of internal functions have been made consistent.