Skip to content

Instantly share code, notes, and snippets.

@xnekv03
xnekv03 / verifyIC.php
Last active Dec 29, 2020 — forked from dg/verifyIC.php
Ověření rodného čísla a IČ
View verifyIC.php
<?php
function verifyIC($ic)
{
// be liberal in what you receive
$ic = preg_replace('#\s+#', '', $ic);
// má požadovaný tvar?
if (!preg_match('#^\d{8}$#', $ic)) {
return FALSE;