src/Translator.php
public static function extractPluralCount($expr)
    {
        $parts = explode(';', $expr, 2);
        $nplurals = explode('=', trim($parts[0]), 2);
        if (strtolower(rtrim($nplurals[0])) != 'nplurals') {
            return 1;
        }
        if (count($nplurals) == 1) {
            return 1;
        }

        return intval($nplurals[1]);
    }
public static function extractPluralCount($expr)
    {
        $parts = explode(';', $expr, 2);
        $nplurals = explode('=', trim($parts[0]), 2);
        if (strtolower(rtrim($nplurals[0])) != 'nplurals') {
            return 1;
        }
        if (count($nplurals) == 1) {
            return 1;
        }

        return intval($nplurals[1]);
    }
public static function extractPluralCount ( $ expr ) { $ parts = explode ( ';' , $ expr , 2 ) ; $ nplurals = explode ( '=' , trim ( $ parts [ 0 ] ) , 2 ) ; if ( strtolower ( rtrim ( $ nplurals [ 0 ] ) ) != 'nplurals' ) { return 1 ; } if ( count ( $ nplurals ) == 1 ) { return 1 ; } return intval ( $ nplurals [ 1 ] ) ; }
Extracts number of plurals from plurals form expression.

@param string $expr Expression to process

@return int Total number of plurals
Extracts number of plurals from plurals form expression .