mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-30 04:19:30 +01:00
19 lines
269 B
Plaintext
19 lines
269 B
Plaintext
Arrow function
|
|
-----
|
|
<?php
|
|
|
|
fn($a) => $a;
|
|
fn($x = 42) => $x;
|
|
fn(&$x) => $x;
|
|
fn&($x) => $x;
|
|
static fn($x, ...$rest) => $rest;
|
|
fn(): int => $x;
|
|
-----
|
|
!!php7
|
|
fn($a) => $a;
|
|
fn($x = 42) => $x;
|
|
fn(&$x) => $x;
|
|
fn&($x) => $x;
|
|
static fn($x, ...$rest) => $rest;
|
|
fn(): int => $x;
|