Why you may need to translate a website

Description of your first forum.
Post Reply
mouakter13
Posts: 171
Joined: Mon Dec 23, 2024 3:52 am

Why you may need to translate a website

Post by mouakter13 »

Released on November 25, 2021, PHP 8.1 is finally here , with several exciting features.

In this article, we will cover in detail what's new in PHP 8.1. From its new features and performance improvements to significant changes and deprecations, we will review them all in depth.

Sit up straight!

New features in PHP 8.1
Let's start by covering all the new features in PHP 8.1. It's a pretty big list.

Pure intersection types
Enums
The return type never
Fiber
New readonly properties
Define final class constants
New fsync() and fdatasync() functions
New function array_is_list()
New features Sodium XChaCha20
New class IntlDatePatternGenerator
AVIF image format support
New key $_FILES: full_path to upload directories
Array unpacking support for String-Keyed Arrays
Explicit notation for octal numbers
Support for MurmurHash3 and xxHash Hash Algorithms
DNS over HTTPS (DoH) support
Uploading files from Strings with CURLStringFile
New constant MYSQLI_REFRESH_REPLICA
Performance Improvements with Inheritance Cache
First class call syntax
Info
PHP 8.1 is now available at Kinsta for all environments. Please sweden whatsapp number data check out our PHP 8.1 feature update for more information.

Pure intersection types
PHP 8.1 adds support for intersection types. This is similar to the union types introduced in PHP 8.0, but its intended use is exactly the opposite.

To better understand its use, let's refresh our memory on how type declarations work in PHP.

Essentially, you can add type declarations to function arguments, return values, and class properties. This assignment is called “type hinting” and ensures that the value is of the correct type at the time of the call. Otherwise, it immediately raises a TypeError . In turn, this helps you debug your code better.

However, declaring a single type has its limitations. Union types help you overcome that by allowing you to declare a value with multiple types, and the input has to satisfy at least one of the declared types.
Post Reply