9/2/2023 0 Comments Php 8.1 new![]() ![]() PHP already supported merging numeric-indexed arrays as in: In PHP, arrays can be used for what other languages may call lists (an ordered collection of values) or for dictionaries or hashes (a collection of (key, value) items). String-keyed array merging through unpacking “Closure::fromCallable“ and creates a shorter and clearer solution. You can now use “function_name(…)“ (where the dots are part of the syntax) to get an anonymous function as in: ![]() This can be used with “match“ expressions that were introduced in PHP 8.0:Ĭontrary to certain other languages in which functions are standard objects, in PHP you can’t just use a function reference to store it into a variable (“$var = strlen “ it not valid). Changes for developers EnumerationsĮnumerations are used whenever you need a type that provides a fixed, limited number of options and allows them to be conveniently named. It’s important to note, though, that these improvements do not depend on the use of JIT (just-in-time) compiler, so you will see improvements as soon as you start using PHP 8.1. PHP announced improvements of around 23% on page rendering using the Symphony Demo App and 3.5% for WordPress (although its latest release does not yet support PHP 8.1). Thanks to several optimizations in the PHP code, page rendering speed has been improved. ![]() Here is a summary of what we feel are the most notable aspects of this release. In its announcement addendum, php.net proudly claims the update will provide “better performance, better syntax, improved type safety.” On November 25, 2021, the PHP development team announced the immediate availability of PHP 8.1, a major release. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |