original_string: public function is_image($path){
          if( !file_exists($path) || !($info = getimagesize($path)) ){
              return false;
          }
          return (bool) preg_match("/^image\/(jpeg|png|gif)$/", $info['mime']);
      }
code: public function is_image($path){
          if( !file_exists($path) || !($info = getimagesize($path)) ){
              return false;
          }
          return (bool) preg_match("/^image\/(jpeg|png|gif)$/", $info['mime']);
      }
code_tokens: public function is_image ( $ path ) { if ( ! file_exists ( $ path ) || ! ( $ info = getimagesize ( $ path ) ) ) { return false ; } return ( bool ) preg_match ( "/^image\/(jpeg|png|gif)$/" , $ info [ 'mime' ] ) ; }
docstring: Detect if specified file is image
  
  @param string $path
  @return bool
docstring_tokens: Detect if specified file is image