Skip to content

Instantly share code, notes, and snippets.

@Arakaki
Created August 29, 2013 02:23
Show Gist options
  • Select an option

  • Save Arakaki/6373632 to your computer and use it in GitHub Desktop.

Select an option

Save Arakaki/6373632 to your computer and use it in GitHub Desktop.
Functional/Group.phpのサンプル
<?php
include './Functional/_import.php';
use Functional as F;
$users = array(
array("name" => "gakkey","group" => "A"),
array("name" => "hapidra","group" => "B"),
array("name" => "oden","group" => "C"),
array("name" => "captain","group" => "A")
);
var_dump(F\group($users,function($user){return $user["group"];}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment