public static function digits($value)
    {
        // we need to remove - and + because they're allowed in the filter
        $cleaned = str_replace(['-', '+'], '', $value);
        $cleaned = filter_var($cleaned, FILTER_SANITIZE_NUMBER_INT);

        return $cleaned;
    }
public static function digits($value)
    {
        // we need to remove - and + because they're allowed in the filter
        $cleaned = str_replace(['-', '+'], '', $value);
        $cleaned = filter_var($cleaned, FILTER_SANITIZE_NUMBER_INT);

        return $cleaned;
    }
public static function digits ( $ value ) { // we need to remove - and + because they're allowed in the filter $ cleaned = str_replace ( [ '-' , '+' ] , '' , $ value ) ; $ cleaned = filter_var ( $ cleaned , FILTER_SANITIZE_NUMBER_INT ) ; return $ cleaned ; }
Return only digits chars

@param $value
@return mixed
Return only digits chars