public static function popValues(
        array $arr,
        $match = false,
        bool $strict = false
    ): array
    {
        $func = Compare::getMethod($strict);
        $len = count($arr);
        while ($len > 0 && call_user_func($func, end($arr), $match)) {
            array_pop($arr);
            $len--;
        }
        return $arr;
    }
public static function popValues(
        array $arr,
        $match = false,
        bool $strict = false
    ): array
    {
        $func = Compare::getMethod($strict);
        $len = count($arr);
        while ($len > 0 && call_user_func($func, end($arr), $match)) {
            array_pop($arr);
            $len--;
        }
        return $arr;
    }
public static function popValues ( array $ arr , $ match = false , bool $ strict = false ) : array { $ func = Compare :: getMethod ( $ strict ) ; $ len = count ( $ arr ) ; while ( $ len > 0 && call_user_func ( $ func , end ( $ arr ) , $ match ) ) { array_pop ( $ arr ) ; $ len -- ; } return $ arr ; }
Remove values from the end of an array using comparison

@param array $arr The source array
@param mixed $match Values matching this value will be removed
@param boolean $strict Whether or not to use strict comparison
@return array
Remove values from the end of an array using comparison