Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php fn closure

// A collection of Post objects
$posts = [/* … */];

$ids = array_map(fn($post) => $post->id, $posts);
Source by stitcher.io #
 
PREVIOUS NEXT
Tagged: #php #fn #closure
ADD COMMENT
Topic
Name
7+5 =