method chain interface for PHP array
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
test
Arry.php
README.md

README.md

arry

method chain inteface for PHP array

method chain

$ret = arr(range(1, 100))
  ->filter(function($v) {
  return $v % 10 == 0;
})->map(function($v) {
  return $v * 2;
})->usort(function($v1, $v2) {
  return $v1 < $v2 ? 1 : -1;
})->y();

get($key)

$ret = arry($array)->get('1.name');