original_string: public function dir_from_url($url){
      $dir = false;
      foreach ( $this->dirs() as $i => $d ){
        if ( (strpos($url, $i) === 0) &&
          (\strlen($i) > \strlen($dir) )
        ){
          $dir = $i;
          break;
        }
      }
      return $dir;
    }
code: public function dir_from_url($url){
      $dir = false;
      foreach ( $this->dirs() as $i => $d ){
        if ( (strpos($url, $i) === 0) &&
          (\strlen($i) > \strlen($dir) )
        ){
          $dir = $i;
          break;
        }
      }
      return $dir;
    }
code_tokens: public function dir_from_url ( $ url ) { $ dir = false ; foreach ( $ this -> dirs ( ) as $ i => $ d ) { if ( ( strpos ( $ url , $ i ) === 0 ) && ( \ strlen ( $ i ) > \ strlen ( $ dir ) ) ) { $ dir = $ i ; break ; } } return $ dir ; }
docstring: Returns the dir's name from an URL
  
  @param string $url
  @return bool|int|string
docstring_tokens: Returns the dir s name from an URL