Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Arrow function in PHP7

Shulou Source: shulou.com Published: 2022-06-01 04:38:30 09月22日 Update

This article mainly shows you "how to use the arrow function in PHP7", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use arrow function in PHP7" this article.

Arrow function (PHP 7.4)

Note, because now it refers to a short closure with only one expression (hence the word "short"):

C = 3 addC addC = fn ($x) = > $x + $c X echo $echo (70); / / 73

The use keyword is not required.

These are all the contents of the article "how to use Arrow functions in PHP7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Functions arrows content articles learning help keys keywords only easy to understand more organization knowledge editing industry expressions information channels closures channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei Linux Xiaomi Shulou Information