protected function getPluralIndex(callable $pluralForm, $number)
    {
        $nplurals = 0;
        $plural = 0;

        call_user_func_array($pluralForm, [&$nplurals, &$plural, $number]);

        if (is_bool($plural)) {
            $plural = $plural ? 1 : 0;
        }

        if ($plural < 0) {
            $plural = 0;
        }

        if ($plural > $nplurals - 1) {
            $plural = $nplurals - 1;
        }

        return $plural;
    }
protected function getPluralIndex(callable $pluralForm, $number)
    {
        $nplurals = 0;
        $plural = 0;

        call_user_func_array($pluralForm, [&$nplurals, &$plural, $number]);

        if (is_bool($plural)) {
            $plural = $plural ? 1 : 0;
        }

        if ($plural < 0) {
            $plural = 0;
        }

        if ($plural > $nplurals - 1) {
            $plural = $nplurals - 1;
        }

        return $plural;
    }
protected function getPluralIndex ( callable $ pluralForm , $ number ) { $ nplurals = 0 ; $ plural = 0 ; call_user_func_array ( $ pluralForm , [ & $ nplurals , & $ plural , $ number ] ) ; if ( is_bool ( $ plural ) ) { $ plural = $ plural ? 1 : 0 ; } if ( $ plural < 0 ) { $ plural = 0 ; } if ( $ plural > $ nplurals - 1 ) { $ plural = $ nplurals - 1 ; } return $ plural ; }
Get plural form index for the given number.

@param callable $pluralForm
@param int      $number

@return int
Get plural form index for the given number .