Skip to content

Instantly share code, notes, and snippets.

@Arakaki
Created August 29, 2013 05:41
Show Gist options
  • Select an option

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

Select an option

Save Arakaki/6374595 to your computer and use it in GitHub Desktop.
zip.phpのサンプル
<?php
include './Functional/_import.php';
use Functional as F;
$resutl1 = Functional\zip(
array('one', 'two', 'three'),
array(1, 2, 3),
array("いち","に","さん"),
array("一","二","三"));
var_dump($resutl1);
$resutl2 = Functional\zip(
array('one', 'two', 'three'),
array(1, 2, 3),
array("いち","に","さん"),
array("一","二","三"),
function($eng, $num,$jp,$kanji) {
return "eng[$eng] : num[$num] : jp[$jp] : kanji[$kanji]";
}
);
var_dump($resutl2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment