Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A Practical Guide to Refactoring your PHP Code: Functional methods example 2
<?php
$types = array_map( function( $event ) {
return $event->type;
}, $events );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment