public static function to_keypair($arr, $protected = 1){
    $num = \count($arr);
    $res = [];
    if ( ($num % 2) === 0 ){
      $i = 0;
      while ( isset($arr[$i]) ){
        if ( !\is_string($arr[$i]) || ( !$protected && !preg_match('/[0-9A-z\-_]+/8', str::cast($arr[$i])) ) ){
          return false;
        }
        $res[$arr[$i]] = $arr[$i+1];
        $i += 2;
      }
    }
    return $res;
  }