Skip to content

Instantly share code, notes, and snippets.

@jimryan
Created July 23, 2013 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimryan/6065797 to your computer and use it in GitHub Desktop.
Save jimryan/6065797 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: PHP Sucks
Description: Missing PHP functions
Version: 1.0
*/
namespace PHPSucks {
class Arr {
static function reject($fcn, $arr) {
foreach($arr as $i=>$v) if($fcn($v)) unset($arr[$i]);
return array_values($arr);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment