<?php
// includes/helpers.php
declare(strict_types=1);

function h($s): string {
  return htmlspecialchars((string)($s ?? ''), ENT_QUOTES, 'UTF-8');
}

function redirect(string $to): void {
  header('Location: ' . $to);
  exit;
}