You can now make a closure from a callable by calling that callable and passing it. While our Wikimedia servers are stuck with PHP 7.2 for a little longer, Im very much. PHP 8.1 introduces a new syntax in creating a callable. Error: Cannot modify readonly property Post::$title First-class callable syntax $post->title = 'Some other and less fancy title' enum Status $post = new Post(title: ‘PHP 8.1 is available on Platform.sh’, /* … */) concept basically refers to a lightweight thread of execution (also called ). , incoming in PHP 8.1 at the end of the year, will introduce a sort of async programming (coroutines) into the wild. This is a feature I’ve expected for years, and I cannot wait to use it as it is such a convenient way to manage collections of constant values. PHP is trying to shove the lack of features from its code base, and Fibers is one of the meaningful additions to the language. ![]() And you can give them a try today on Platform.sh. Those functionalities and many more are available now. Dmitry Stogov, the author of this impressive feature, describes this as a new transparent technology that eliminates the overhead of PHP class inheritance.Īnd finally, Fibers could constitute no less than a groundbreaking shift in the PHP ecosystem by adding a low-level mechanism to manage parallelism. It also provides some nice performance improvements estimated at around 5 to 8%. PHP 8.1 comes with many new and long-expected features such as Enums, Readonly properties, First-class callable syntax, and new in initializers. ![]() ![]() The new PHP foundation releases a new main version every year at the very end of November, and It’s some kind of early Christmas for us developers and application makers. Just days after its official release, we are thrilled to announce the immediate availability of PHP 8.1 for all Grid plans projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |