Created
July 23, 2013 20:21
-
-
Save jimryan/6065797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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