src/Iso3166.php
public static function getByAlpha2($alpha2)
    {
        $alpha2 = strtoupper($alpha2);

        if (!isset(static::$countries[$alpha2])) {
            throw new OutOfBoundsException("The 2 character alpha code \"$alpha2\" is not listed in ISO 3166");
        }

        return new Country(static::$countries[$alpha2]);
    }
public static function getByAlpha2($alpha2)
    {
        $alpha2 = strtoupper($alpha2);

        if (!isset(static::$countries[$alpha2])) {
            throw new OutOfBoundsException("The 2 character alpha code \"$alpha2\" is not listed in ISO 3166");
        }

        return new Country(static::$countries[$alpha2]);
    }
public static function getByAlpha2 ( $ alpha2 ) { $ alpha2 = strtoupper ( $ alpha2 ) ; if ( ! isset ( static :: $ countries [ $ alpha2 ] ) ) { throw new OutOfBoundsException ( "The 2 character alpha code \"$alpha2\" is not listed in ISO 3166" ) ; } return new Country ( static :: $ countries [ $ alpha2 ] ) ; }
Find and return country by its alphabetic two-character identifier.

@param string $alpha2
@return array
Find and return country by its alphabetic two - character identifier .