public function testArray() { $object = (object) array('p' => 'PPP', 'i' => 'III', 'z' => '', 'w' => 123); isSame(array('p' => 'PPP', 'i' => 'III', 'z' => '', 'w' => 123), Filter::_($object, 'arr')); isSame(array('p' => 'PPP', 'i' => 'III', 'w' => 123), Filter::arr($object, 'noempty')); isSame(array('w' => 123), Filter::arr($object, function ($value) { return $value === 123 ? true : false; })); }