<?php
function check($dateAdded){
$now = new DateTime('now');
$secondsInPast = $now->getTimestamp() - $dateAdded->getTimestamp();
if($secondsInPast > 60*60*2){
echo $dateAdded->format('H:n:s'). " Old enough\n";
} else {
echo $dateAdded->format('H:n:s'). "Not Old Enough\n";
}
}
check(new DateTime('- 13 seconds'));
check(new DateTime('- 13 minutes'));
check(new DateTime('- 100 minutes'));
check(new DateTime('- 125 minutes'));
- Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- 18:10:24Not Old Enough
17:10:37Not Old Enough
16:10:37Not Old Enough
16:10:37 Old enough
- Output for 7.3.32 - 7.3.33, 8.0.13
- 16:10:24Not Old Enough
15:10:37Not Old Enough
14:10:37Not Old Enough
14:10:37 Old enough
- Output for 7.0.6
- 03:5:00Not Old Enough
03:5:13Not Old Enough
02:5:13Not Old Enough
01:5:13 Old enough
- Output for 7.0.5
- 17:4:01Not Old Enough
16:4:14Not Old Enough
15:4:14Not Old Enough
15:4:14 Old enough
- Output for 7.0.4
- 02:3:57Not Old Enough
02:3:10Not Old Enough
01:3:10Not Old Enough
00:3:10 Old enough
- Output for 7.0.3
- 03:3:17Not Old Enough
02:3:30Not Old Enough
01:3:30Not Old Enough
00:3:30 Old enough
- Output for 7.0.2
- 13:3:55Not Old Enough
13:3:08Not Old Enough
11:3:08Not Old Enough
11:3:08 Old enough
- Output for 7.0.1
- 13:3:50Not Old Enough
13:3:03Not Old Enough
12:3:03Not Old Enough
11:3:03 Old enough
- Output for 7.0.0
- 16:3:55Not Old Enough
15:3:08Not Old Enough
14:3:08Not Old Enough
14:3:08 Old enough
- Output for 5.6.21
- 22:5:51Not Old Enough
22:5:04Not Old Enough
21:5:04Not Old Enough
20:5:04 Old enough
- Output for 5.6.20
- 12:4:58Not Old Enough
12:4:11Not Old Enough
10:4:11Not Old Enough
10:4:11 Old enough
- Output for 5.6.19
- 01:3:42Not Old Enough
01:3:55Not Old Enough
23:3:55Not Old Enough
23:3:55 Old enough
- Output for 5.6.18
- 13:3:20Not Old Enough
13:3:33Not Old Enough
12:3:33Not Old Enough
11:3:33 Old enough
- Output for 5.6.17
- 07:3:26Not Old Enough
07:3:39Not Old Enough
05:3:39Not Old Enough
05:3:39 Old enough
- Output for 5.6.16
- 17:3:14Not Old Enough
17:3:27Not Old Enough
16:3:27Not Old Enough
15:3:27 Old enough
- Output for 5.6.15
- 18:3:43Not Old Enough
18:3:56Not Old Enough
17:3:56Not Old Enough
16:3:56 Old enough
- Output for 5.6.14
- 21:4:56Not Old Enough
21:4:09Not Old Enough
19:4:09Not Old Enough
19:4:09 Old enough
- Output for 5.6.13
- 01:4:12Not Old Enough
01:4:25Not Old Enough
23:4:25Not Old Enough
23:4:25 Old enough
- Output for 5.6.12
- 14:4:05Not Old Enough
14:4:18Not Old Enough
12:4:18Not Old Enough
12:4:18 Old enough
- Output for 5.6.11
- 21:4:48Not Old Enough
21:4:01Not Old Enough
20:4:01Not Old Enough
19:4:01 Old enough
- Output for 5.6.10
- 23:4:40Not Old Enough
23:4:53Not Old Enough
21:4:53Not Old Enough
21:4:53 Old enough
- Output for 5.6.9
- 04:4:14Not Old Enough
04:4:27Not Old Enough
02:4:27Not Old Enough
02:4:27 Old enough
- Output for 5.6.8
- 12:4:14Not Old Enough
12:4:27Not Old Enough
10:4:27Not Old Enough
10:4:27 Old enough
- Output for 5.6.7
- 00:5:00Not Old Enough
23:5:13Not Old Enough
22:5:13Not Old Enough
22:5:13 Old enough
- Output for 5.5.35
- 02:5:36Not Old Enough
02:5:49Not Old Enough
00:5:49Not Old Enough
00:5:49 Old enough
- Output for 5.5.34
- 18:4:34Not Old Enough
18:4:47Not Old Enough
16:4:47Not Old Enough
16:4:47 Old enough
- Output for 5.5.33
- 13:3:00Not Old Enough
13:3:13Not Old Enough
12:3:13Not Old Enough
11:3:13 Old enough
- Output for 5.5.32
- 19:3:09Not Old Enough
19:3:22Not Old Enough
17:3:22Not Old Enough
17:3:22 Old enough
- Output for 5.5.31
- 10:3:57Not Old Enough
10:3:10Not Old Enough
08:3:10Not Old Enough
08:3:10 Old enough
- Output for 5.5.30
- 20:3:38Not Old Enough
20:3:51Not Old Enough
19:3:51Not Old Enough
18:3:51 Old enough
- Output for 5.5.29
- 15:4:21Not Old Enough
15:4:34Not Old Enough
13:4:34Not Old Enough
13:4:34 Old enough
- Output for 5.5.28
- 17:4:49Not Old Enough
17:4:02Not Old Enough
16:4:02Not Old Enough
15:4:02 Old enough
- Output for 5.5.27
- 20:4:50Not Old Enough
19:4:03Not Old Enough
18:4:03Not Old Enough
18:4:03 Old enough
- Output for 5.5.26
- 01:4:29Not Old Enough
01:4:42Not Old Enough
00:4:42Not Old Enough
23:4:42 Old enough
- Output for 5.5.25
- 07:4:40Not Old Enough
07:4:53Not Old Enough
06:4:53Not Old Enough
05:4:53 Old enough
- Output for 5.5.24
- 15:4:53Not Old Enough
15:4:06Not Old Enough
13:4:06Not Old Enough
13:4:06 Old enough
- Output for 5.4.45
- 15:9:37Not Old Enough
14:9:50Not Old Enough
13:9:50Not Old Enough
12:9:50 Old enough
- Output for 5.4.44
- 02:8:20Not Old Enough
02:8:33Not Old Enough
00:8:33Not Old Enough
00:8:33 Old enough
- Output for 5.4.43
- 02:8:16Not Old Enough
02:8:29Not Old Enough
00:8:29Not Old Enough
00:8:29 Old enough
- Output for 5.4.42
- 09:7:58Not Old Enough
09:7:11Not Old Enough
07:7:11Not Old Enough
07:7:11 Old enough
- Output for 5.4.41
- 09:7:56Not Old Enough
09:7:09Not Old Enough
07:7:09Not Old Enough
07:7:09 Old enough
- Output for 5.4.40
- 09:7:52Not Old Enough
09:7:05Not Old Enough
07:7:05Not Old Enough
07:7:05 Old enough
- Output for 5.4.39
- 09:7:51Not Old Enough
09:7:04Not Old Enough
07:7:04Not Old Enough
07:7:04 Old enough
- Output for 5.4.38
- 09:7:50Not Old Enough
09:7:03Not Old Enough
07:7:03Not Old Enough
07:7:03 Old enough
- Output for 5.4.35 - 5.4.37
- 09:7:47Not Old Enough
09:7:00Not Old Enough
07:7:00Not Old Enough
07:7:00 Old enough
- Output for 5.4.34
- 09:7:46Not Old Enough
09:7:59Not Old Enough
07:7:59Not Old Enough
07:7:59 Old enough
- Output for 5.4.24 - 5.4.32
- 18:10:28Not Old Enough
17:10:41Not Old Enough
16:10:41Not Old Enough
16:10:41 Old enough
- Output for 5.4.2 - 5.4.23
- 18:10:29Not Old Enough
17:10:42Not Old Enough
16:10:42Not Old Enough
16:10:42 Old enough
- Output for 5.3.11 - 5.3.29, 5.4.0 - 5.4.1
- 18:10:30Not Old Enough
17:10:43Not Old Enough
16:10:43Not Old Enough
16:10:43 Old enough
- Output for 5.3.0 - 5.3.10
- 18:10:31Not Old Enough
17:10:44Not Old Enough
16:10:44Not Old Enough
16:10:44 Old enough
- Output for 5.2.0 - 5.2.17
- Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Kp57s on line 5
Process exited with code 255. - Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
- Fatal error: Class 'DateTime' not found in /in/Kp57s on line 13
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
- Fatal error: Cannot instantiate non-existent class: datetime in /in/Kp57s on line 13
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Cannot instantiate non-existent class: datetime in /in/Kp57s on line 13
preferences:
212.21 ms | 401 KiB | 313 Q