Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the new features of PHP7.4

Shulou Source: shulou.com Published: 2022-06-03 14:09:58 11月14日 Update

This article mainly explains "what are the new features of PHP7.4". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the new features of PHP7.4"?

New features of PHP7.4

PHP7.4 has been released. It also brings some new features. We can write less code.

1. Property to add qualified types

4. Array unpacking

Use the unfold operator. Unpack the array. This feature should be absorbed from js again. Look at the example.

6. Numeric text separator

Numeric text can contain underscores between numbers.

7. Allow an exception to be thrown from _ _ toString ()

Exceptions are now allowed to be thrown from _ _ toString (), which used to result in fatal errors, and existing recoverable fatal errors in string conversion have been converted to Error exceptions.

8. Filter

New FILTER_VALIDATE_FLOAT

Finally, you don't have to worry about asking you what the result is during the interview. In fact, in production, people will not write like this.

two。 Curly braces access array index

Tags: Features arrays types errors code writing functions operators learning operations content parentheses numbers text support compilation truth underlining no between Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft Huawei OPPO Reno Shulou Tech Info