3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastDate = '1452699936'; $interval = 'P0Y0M1D'; //create objects from strings $interval = new \DateInterval($interval); echo 'Interval: '.$interval->format('%y years, %m months, %d days')."\n"; //last sent $lastJob = new \Datetime(); $lastJob->setTimestamp($lastDate); //las sent + interval $nextJob = new \Datetime(); $nextJob->setTimestamp($lastDate); $nextJob->add($interval); //now $currentJob = new \Datetime(); echo 'Last Sent: '.$lastJob->format('Y/m/d'). ' | Next Job: '.$nextJob->format('Y/m/d'). ' | Today: '.$currentJob->format('Y/m/d')."\n"; if ($nextJob > $currentJob) { echo 'not ready to send.'; } else { echo 'ready to send'; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0180.00416.75
8.3.50.0120.00721.15
8.3.40.0090.00619.09
8.3.30.0090.00618.84
8.3.20.0080.00020.21
8.3.10.0000.00821.71
8.3.00.0040.00423.36
8.2.180.0000.01418.41
8.2.170.0040.01122.96
8.2.160.0100.00320.22
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00820.75
8.2.120.0040.00426.35
8.2.110.0090.00019.24
8.2.100.0090.00317.91
8.2.90.0030.00519.26
8.2.80.0030.00517.97
8.2.70.0030.00617.75
8.2.60.0040.00418.05
8.2.50.0040.00418.09
8.2.40.0030.00520.41
8.2.30.0040.00419.56
8.2.20.0030.00517.88
8.2.10.0000.00818.25
8.2.00.0050.00318.20
8.1.280.0110.00425.92
8.1.270.0200.00022.09
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0000.00922.66
8.1.230.0060.00617.70
8.1.220.0000.00817.91
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0080.00018.71
8.1.160.0070.00020.80
8.1.150.0040.00420.68
8.1.140.0050.00319.69
8.1.130.0050.00317.70
8.1.120.0040.00317.57
8.1.110.0000.00717.68
8.1.100.0000.00717.51
8.1.90.0100.00017.66
8.1.80.0050.00317.64
8.1.70.0000.00817.55
8.1.60.0050.00517.68
8.1.50.0050.00317.63
8.1.40.0030.00617.55
8.1.30.0040.00417.82
8.1.20.0030.00517.58
8.1.10.0000.00717.69
8.1.00.0040.00417.71
8.0.300.0000.00818.77
8.0.290.0030.00516.74
8.0.280.0030.00318.57
8.0.270.0080.00017.21
8.0.260.0000.00817.32
8.0.250.0030.00317.06
8.0.240.0030.00317.23
8.0.230.0070.00017.20
8.0.220.0030.00616.97
8.0.210.0070.00017.07
8.0.200.0000.00817.13
8.0.190.0070.00017.22
8.0.180.0060.00317.18
8.0.170.0050.00317.13
8.0.160.0000.00817.19
8.0.150.0070.00016.88
8.0.140.0030.00616.96
8.0.130.0000.00513.41
8.0.120.0080.00016.96
8.0.110.0000.00817.15
8.0.100.0080.00017.13
8.0.90.0000.00717.14
8.0.80.0100.00716.98
8.0.70.0070.00017.18
8.0.60.0080.00017.14
8.0.50.0040.00417.03
8.0.30.0050.01317.17
8.0.20.0160.00617.40
8.0.10.0030.00517.24
8.0.00.0080.01216.95
7.4.330.0020.00216.79
7.4.320.0030.00316.83
7.4.300.0000.00816.74
7.4.290.0000.00816.64
7.4.280.0040.00416.64
7.4.270.0030.00316.79
7.4.260.0040.00416.61
7.4.250.0040.00416.61
7.4.240.0030.00316.72
7.4.230.0050.00216.58
7.4.220.0170.00316.77
7.4.210.0060.00816.73
7.4.200.0040.00416.75
7.4.160.0080.00816.73
7.4.150.0060.01217.40
7.4.140.0140.00617.86
7.4.130.0120.00716.66
7.4.120.0120.00516.80
7.4.110.0180.00716.61
7.4.100.0110.00716.57
7.4.90.0110.00616.62
7.4.80.0120.00419.39
7.4.70.0170.00716.49
7.4.60.0100.00716.77
7.4.50.0030.01016.64
7.4.40.0030.01716.73
7.4.30.0120.00916.55
7.4.00.0140.00415.18
7.3.330.0030.00313.16
7.3.320.0000.00613.29
7.3.310.0050.00216.48
7.3.300.0030.00316.40
7.3.290.0000.00716.31
7.3.280.0120.00616.39
7.3.270.0090.00817.40
7.3.260.0030.02016.48
7.3.250.0110.00716.54
7.3.240.0090.00916.58
7.3.230.0170.00416.70
7.3.210.0070.01016.52
7.3.200.0070.01519.39
7.3.190.0130.00316.74
7.3.180.0170.00316.75
7.3.170.0030.01616.72
7.3.160.0120.00416.56
7.2.330.0090.00916.88
7.2.320.0080.01216.75
7.2.310.0100.00716.64
7.2.300.0120.00616.78
7.2.290.0070.01016.84
7.2.60.0070.00717.06
7.2.00.0000.01619.67
7.1.200.0000.01415.98
7.1.100.0080.00018.15
7.1.70.0000.00717.32
7.1.60.0070.01719.40
7.1.50.0070.00717.23
7.1.00.0100.07022.45
7.0.200.0590.01215.05
7.0.60.0400.06720.09
7.0.50.0070.05017.92
7.0.40.0030.04720.12
7.0.30.0330.08020.16
7.0.20.0170.04720.01
7.0.10.0070.09020.11
7.0.00.0130.03720.29
5.6.280.0000.05320.85
5.6.210.0000.04320.69
5.6.200.0030.07718.12
5.6.190.0070.04020.45
5.6.180.0270.05720.49
5.6.170.0270.06020.72
5.6.160.0070.08320.60
5.6.150.0030.06318.18
5.6.140.0170.07318.21
5.6.130.0170.07018.20
5.6.120.0170.06721.12
5.6.110.0170.07721.11
5.6.100.0070.06321.11
5.6.90.0030.08320.96
5.6.80.0100.08020.53
5.5.350.0270.08020.46
5.5.340.0030.05717.96
5.5.330.0100.08020.19
5.5.320.0230.06720.32
5.5.310.0200.05020.28
5.5.300.0070.08018.02
5.5.290.0030.07018.02
5.5.280.0000.04320.77
5.5.270.0170.05020.86
5.5.260.0100.06320.84
5.5.250.0100.05720.61
5.5.240.3770.04020.24

preferences:
65.45 ms | 401 KiB | 5 Q