Iso/Iso3166Converter.php
public function convertAlpha3ToAlpha2($alpha3)
    {
        $alpha2 = array_search($alpha3, self::$codes);
        if (false === $alpha2) {
            return null;
        }

        return (string) $alpha2;
    }
public function convertAlpha3ToAlpha2($alpha3)
    {
        $alpha2 = array_search($alpha3, self::$codes);
        if (false === $alpha2) {
            return null;
        }

        return (string) $alpha2;
    }
public function convertAlpha3ToAlpha2 ( $ alpha3 ) { $ alpha2 = array_search ( $ alpha3 , self :: $ codes ) ; if ( false === $ alpha2 ) { return null ; } return ( string ) $ alpha2 ; }
Gets the ISO3166 alpha-2 code that corresponds to the provided alpha-3 code.

@param string $alpha3
@return string|null
Gets the ISO3166 alpha - 2 code that corresponds to the provided alpha - 3 code .