Skip to content

Language: Arrow functions (fn() => expr) #142

@PurHur

Description

@PurHur

Problem

Short closures fn($x) => $x * 2 are not in compiler pipeline. Needed for array_map style callbacks in modern PHP.

Goal

Single-expression arrow functions with lexical use (phase 1: no use).

Tasks

Acceptance

$d = array_map(fn($x) => $x * 2, [1, 2, 3]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions