first commit

This commit is contained in:
aschwarz
2022-11-28 10:27:30 +01:00
commit 9015dd2102
2720 changed files with 605111 additions and 0 deletions

15
func_age.php Executable file
View File

@ -0,0 +1,15 @@
<?php
function ifAge ($check){
if (!preg_match ("%(\d{1,2}.\d{1,2}.\d{2,4})\s*([<>=]{1,2})\s*(\d+)%", $check, $check))
return false;
$date = explode (".", $check[1]);
$date = mktime (0, 0, 0, $date[1], $date[0], $date[2]);
$date = strtotime ("+ $check[3] years", $date);
eval ("\$value = (" . time() . " $check[2] $date);");
return $value;
}
# echo (int) ifAge ("29.01.2002 > 18");
# Ausgabe 0, nicht vollj<6C>hrig; Ausgabe 1, vollj<6C>hrig
?>