-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththierry.php
More file actions
36 lines (28 loc) · 775 Bytes
/
thierry.php
File metadata and controls
36 lines (28 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?
//echo date('Y-m-d H:i:s');
//function age($birthday){
// list($day,$month,$year) = explode("/",$birthday);
// $year_diff = date("Y") - $year;
// $month_diff = date("m") - $month;
// $day_diff = date("d") - $day;
// if ($day_diff < 0 && $month_diff==0){$year_diff--;}
// if ($day_diff < 0 && $month_diff < 0){$year_diff--;}
// return $year_diff;
//}
//
//$dob = '24/03/1981';
//echo age($dob);
phpinfo();
//error_reporting(E_ALL);
//echo '<pre>';
// A FUNCTION TO RETURN THE AGE ON A GIVEN DATE
//function your_age($birth_day, $test_date='Today')
//{
// $alpha_date = new DateTime($birth_day);
// $omega_date = new DateTime($test_date);
// $diff = $omega_date->diff($alpha_date);
// return $diff->y;
//}
//
//var_dump( your_age('May 12, 1993') );
?>