PHP version changes
Some seemingly basic functions only exist in PHP 8+
Some normally core functions in other languages only exist in new-ish versions of PHP. Here's a list of functions that are not available in older versions:
// https://www.php.net/manual/en/function.str-contains.php
str_contains($haystack, $needle); // bool
// https://www.php.net/manual/en/function.str-starts-with.php
str_starts_with($haystack, $needle); // bool
// https://www.php.net/manual/en/function.str-ends-with.php
str_ends_with($haystack, $needle); // bool
// https://www.php.net/manual/en/function.fdiv
fdiv($num1, $num2); // float, INF, -INF, or NAN
// https://www.php.net/manual/en/function.get-debug-type
// Returns useful data instead of just "Object", compared to gettype().
get_debug_type($value); // string
Error reporting defaults are different in PHP 8
The default settings for which errors are reported have changed:
; old default (PHP versions before 8)
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; new default (PHP 8 onwards)
error_reporting = E_ALL
When upgrading, you might therefore see a lot more errors and warnings in your logs than you would expect.