This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isCnpValid (string $cnp) : bool { | |
if (empty($cnp) || (preg_match('/^[1-9]{1}[0-9]{12}$/', $cnp) !== 1)) { | |
return false; | |
} | |
$birthMonth = (int) ($cnp[3] . $cnp[4]); | |
if (!$birthMonth || ($birthMonth > 12)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" class="nojs"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<title>jQuery - Accessible Tabs</title> | |
<meta name="description" content="" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sanitize a multidimensional array | |
* | |
* @uses htmlspecialchars | |
* | |
* @param (array) | |
* @return (array) the sanitized array | |
*/ |