original_string: public function find() {
  		if (func_num_args() == 1) {
  			$callback = func_get_arg(0);
  		} else {
  			$query = func_get_arg(0);
  			$callback = func_get_arg(1);
  		}
  
  		foreach ($this->array as $element) {
  			$return = func_num_args() == 1 ? $callback($element) : $callback($element, $query);
  
  			if ($return) {
  				return $element;
  			}
  		}
  
  		return null;
  	}
code: public function find() {
  		if (func_num_args() == 1) {
  			$callback = func_get_arg(0);
  		} else {
  			$query = func_get_arg(0);
  			$callback = func_get_arg(1);
  		}
  
  		foreach ($this->array as $element) {
  			$return = func_num_args() == 1 ? $callback($element) : $callback($element, $query);
  
  			if ($return) {
  				return $element;
  			}
  		}
  
  		return null;
  	}
code_tokens: public function find ( ) { if ( func_num_args ( ) == 1 ) { $ callback = func_get_arg ( 0 ) ; } else { $ query = func_get_arg ( 0 ) ; $ callback = func_get_arg ( 1 ) ; } foreach ( $ this -> array as $ element ) { $ return = func_num_args ( ) == 1 ? $ callback ( $ element ) : $ callback ( $ element , $ query ) ; if ( $ return ) { return $ element ; } } return null ; }
docstring: Searches the array with a given callback and returns the first element if found.
  
  The callback function takes one or two parameters:
  
  function ($element [, $query]) {}
  
  The callback must return a boolean
  
  @param mixed $query OPTIONAL the provided query
  @param callable $callback the callback function
  @return mixed|null the found element or null if it hasn't been found
docstring_tokens: Searches the array with a given callback and returns the first element if found .