Short closures are a way of writing cleaner short functions in PHP:
// A collection of Post objects
$posts = [/* … */];
$ids = array_map(fn($post) => $post->id, $posts);
You can read all about them here: https://stitcher.io/blog/short-closures-in-php
Top comments (1)
As for me It's a great change, but It'd better use construct like ()=> - it's shorter