Ensuring a #php array is single typed with no dependency:

declare(strict_types=1);

$a = ['1', 2];
$f = function(int ...$v){ return $v;};
try {
  $b = $f(...$a);
} catch (\TypeError $e) {
  echo "Not a dictionnary";
  exit(1);
}
var_dump($b);