- Intersection Types
- Enums
never
return type- Fibers
- Readonly Properties
- New in initializers
final
class constants- New
fsync
andfdatasync
functions - New
array_is_list
function - New Sodium
XChaCha20
functions - GD: AVIF image support
- Intl: New
IntlDatePatternGenerator
class - Phar: Added OpenSSL-256 and OpenSSL-512 signature algorithms
- GD: Lossless WebP encoding support
- New
#[ReturnTypeWillChange]
attribute - First-class Callable Syntax
$_FILES
: Newfull_path
value for directory-uploads- Array unpacking support for string-keyed arrays
- Explicit Octal numeral notation
- Hash functions accept algorithm-specific
$options
- MurmurHash3 hash algorithm support
- xxHash hash algorithms support
- FPM: Configurable child-process spawn rate
- Curl: DNS-over-HTTPS support
- Curl: File uploads from strings with
CURLStringFile
- MySQLi: New
MYSQLI_REFRESH_REPLICA
constant
- HTML entity en/decode functions process single quotes and substitute by default
$GLOBALS
variable restrictions- Phar: Default signature algorithm changed from SHA1 to SHA256
SplFixedArray
implementsJsonSerializable
, and json-encodes as an array- CLI: Interactive shell (
php -a
) requiresreadline
extension - MySQLi: Default error mode set to exceptions
- Configurable line endings for
fputcsv
andSplFileObject::fputcsv
version_compare
operator restrictions- Warning on
compact
function calls with non-string and non-array string parameters - finfo Extension:
file_info
resource are migrated to existingfinfo
objects - IMAP:
imap
resources areIMAP\Connection
class objects - FTP Extension: Connection resources are
FTP\Connection
class objects - GD Extension: Font identifiers are
GdFont
class objects - LDAP: resources migrated to
LDAP\Connection
,LDAP\Result
, andLDAP\ResultEntry
objects - PostgreSQL:
resource
s migrated toPgSql\Connection
,PgSql\Result
, andPgSql\Lob
objects - Pspell:
pspell
,pspell config
resources arePSpell\Dictionary
,PSpell\Config
class objects
- Passing
null
to non-nullable internal function parameters is deprecated - Return types in PHP built-in class methods and deprecation notices
Serializable
interface deprecated- Implicit incompatible float to int conversion is deprecated
mysqli::get_client_info
method andmysqli_get_client_info
($param) is deprecateddate_sunrise
,date_sunset
functions and related INI settings are deprecatedstrptime
function is deprecatedmhash*()
functions (hash extension) are deprecatedfilter.default
andfilter.default_options
INI settings are deprecatedPDO::FETCH_SERIALIZE
is deprecatedauto_detect_line_endings
INI directive is deprecatedstrftime
andgmstrftime
functions are deprecated- MySQLi:
mysqli_driver->driver_version
property is deprecated
- Psalm
- PHPStan
- PHPCompatibility
composer why-not php ^8.1
composer require symfony/polyfill-php81