original_string: public function where(callable $filter)
      {
          $filtered = [];
  
          foreach ($this->array as $key => $value) {
              if ($filter($key, $value) === true) {
                  $filtered[$key] = $value;
              }
          }
  
          return $filtered;
      }
code: public function where(callable $filter)
      {
          $filtered = [];
  
          foreach ($this->array as $key => $value) {
              if ($filter($key, $value) === true) {
                  $filtered[$key] = $value;
              }
          }
  
          return $filtered;
      }
code_tokens: public function where ( callable $ filter ) { $ filtered = [ ] ; foreach ( $ this -> array as $ key => $ value ) { if ( $ filter ( $ key , $ value ) === true ) { $ filtered [ $ key ] = $ value ; } } return $ filtered ; }
docstring: Filter using the given callback function.
  
  @param callable $filter The filter function should be a function with the
  following signature:
  
  ```php
  function($key, $value)
  {
  // returns true if the value is matching your criteria.
  }
  ```
  
  @return array
docstring_tokens: Filter using the given callback function .