HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Keywords : Create an arrow function
The fn
keyword is used to create arrow functions. Arrow functions are only available in
PHP versions 7.4 and up.
Arrow functions have access to all variables from the scope in which they were created.
The general syntax of an arrow function is:
fn(arguments) => expression to be returned;
❮ PHP Keywords