original_string: public static function filter(array $arr, callable $callback)
      {
          foreach ($arr as $key => $value) {
  
              if (is_array($value) && count($value) > 0) {
                  $arr[$key] = static::filter($value, $callback);
              }
  
              if (!call_user_func($callback, $arr[$key], $key)) {
                  unset($arr[$key]);
              }
  
          }
  
          return $arr;
      }
code: public static function filter(array $arr, callable $callback)
      {
          foreach ($arr as $key => $value) {
  
              if (is_array($value) && count($value) > 0) {
                  $arr[$key] = static::filter($value, $callback);
              }
  
              if (!call_user_func($callback, $arr[$key], $key)) {
                  unset($arr[$key]);
              }
  
          }
  
          return $arr;
      }
code_tokens: public static function filter ( array $ arr , callable $ callback ) { foreach ( $ arr as $ key => $ value ) { if ( is_array ( $ value ) && count ( $ value ) > 0 ) { $ arr [ $ key ] = static :: filter ( $ value , $ callback ) ; } if ( ! call_user_func ( $ callback , $ arr [ $ key ] , $ key ) ) { unset ( $ arr [ $ key ] ) ; } } return $ arr ; }
docstring: Recursively remove elements and from an array using a callback function
  
  @param array $arr
  @param callable $callback
  @return null
docstring_tokens: Recursively remove elements and from an array using a callback function