3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastDate = '1452699936'; $interval = 'P0Y0M3D'; //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"; var_dump($nextJob); var_dump($currentJob); 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.0160.00616.63
8.3.50.0110.01021.27
8.3.40.0150.00018.79
8.3.30.0090.00618.83
8.3.20.0080.00020.35
8.3.10.0000.00821.90
8.3.00.0090.00023.71
8.2.180.0000.01416.50
8.2.170.0120.00322.96
8.2.160.0070.00720.30
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00020.75
8.2.120.0000.00826.35
8.2.110.0030.00619.02
8.2.100.0000.01117.93
8.2.90.0080.00019.31
8.2.80.0000.00817.97
8.2.70.0000.00917.75
8.2.60.0040.00417.91
8.2.50.0080.00018.09
8.2.40.0030.00522.26
8.2.30.0000.00719.45
8.2.20.0050.00317.91
8.2.10.0040.00418.25
8.2.00.0040.00418.12
8.1.280.0090.00625.92
8.1.270.0110.00822.21
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0060.00322.48
8.1.230.0110.00017.82
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0060.00317.38
8.1.190.0040.00417.47
8.1.180.0000.00718.10
8.1.170.0000.00918.56
8.1.160.0000.00820.84
8.1.150.0000.00718.80
8.1.140.0000.00819.57
8.1.130.0000.00717.77
8.1.120.0030.00517.68
8.1.110.0040.00417.70
8.1.100.0000.00817.66
8.1.90.0060.00617.70
8.1.80.0060.00617.65
8.1.70.0070.00017.55
8.1.60.0070.00317.71
8.1.50.0080.00017.56
8.1.40.0060.00317.67
8.1.30.0080.00017.79
8.1.20.0000.00917.71
8.1.10.0030.00517.67
8.1.00.0000.00817.68
8.0.300.0090.00018.96
8.0.290.0000.00717.00
8.0.280.0070.00018.40
8.0.270.0050.00217.21
8.0.260.0070.00017.23
8.0.250.0030.00317.17
8.0.240.0030.00317.10
8.0.230.0040.00417.05
8.0.220.0090.00017.07
8.0.210.0030.00517.09
8.0.200.0000.00717.16
8.0.190.0080.00017.16
8.0.180.0040.00417.10
8.0.170.0050.00317.05
8.0.160.0040.00417.11
8.0.150.0040.00417.03
8.0.140.0040.00417.04
8.0.130.0060.00013.42
8.0.120.0000.00817.05
8.0.110.0000.00817.15
8.0.100.0080.00016.99
8.0.90.0040.00417.14
8.0.80.0120.00317.04
8.0.70.0040.00417.00
8.0.60.0000.00717.02
8.0.50.0000.00817.17
8.0.30.0040.01417.23
8.0.20.0130.01117.43
8.0.10.0040.00417.11
8.0.00.0150.00316.97
7.4.330.0050.00016.83
7.4.320.0070.00016.70
7.4.300.0040.00416.65
7.4.290.0030.00316.61
7.4.280.0030.00516.65
7.4.270.0050.00216.64
7.4.260.0030.00316.73
7.4.250.0070.00016.60
7.4.240.0040.00416.59
7.4.230.0000.00716.75
7.4.220.0080.01116.83
7.4.210.0060.00816.68
7.4.200.0040.00316.85
7.4.160.0120.00916.86
7.4.150.0070.01317.40
7.4.140.0150.00417.86
7.4.130.0110.00916.55
7.4.120.0090.01216.70
7.4.110.0040.01516.66
7.4.100.0000.02216.57
7.4.90.0120.00616.62
7.4.80.0100.00719.39
7.4.70.0040.01516.70
7.4.60.0090.00916.74
7.4.50.0070.01016.63
7.4.40.0040.01216.73
7.4.30.0030.01916.61
7.4.00.0030.00915.04
7.3.330.0030.00313.16
7.3.320.0050.00013.21
7.3.310.0000.00716.50
7.3.300.0040.00416.41
7.3.290.0040.00416.37
7.3.280.0120.00916.40
7.3.270.0040.01317.40
7.3.260.0090.01916.60
7.3.250.0100.00716.47
7.3.240.0120.00816.59
7.3.230.0070.01116.39
7.3.210.0090.00916.43
7.3.200.0140.00419.39
7.3.190.0160.00616.61
7.3.180.0140.00316.54
7.3.170.0060.01316.52
7.3.160.0040.01216.69
7.3.10.0110.00416.90
7.3.00.0030.01016.70
7.2.330.0070.01116.77
7.2.320.0100.01316.76
7.2.310.0090.00917.02
7.2.300.0130.01016.82
7.2.290.0100.00716.73
7.2.130.0090.00317.05
7.2.120.0070.00716.94
7.2.110.0070.00816.89
7.2.100.0030.01317.08
7.2.90.0030.01017.19
7.2.80.0090.00317.13
7.2.70.0030.01117.16
7.2.60.0070.00717.01
7.2.50.0100.00016.93
7.2.40.0070.00717.25
7.2.30.0090.00617.20
7.2.20.0120.00617.02
7.2.10.0070.01016.75
7.2.00.0080.00518.42
7.1.250.0000.01415.95
7.1.200.0070.00716.00
7.1.70.0030.00717.05
7.1.60.0040.00717.17
7.1.50.0100.01017.24
7.1.00.0070.07022.44
7.0.200.0030.01216.74
7.0.60.0330.05720.01
7.0.50.0030.04017.92
7.0.40.0170.07720.20
7.0.30.0300.05720.00
7.0.20.0270.05020.17
7.0.10.0070.09020.17
7.0.00.0070.04020.08
5.6.280.0030.03321.10
5.6.210.0100.03720.75
5.6.200.0070.08318.19
5.6.190.0100.08320.39
5.6.180.0270.08020.56
5.6.170.0230.06720.41
5.6.160.0030.05020.38
5.6.150.0100.07018.24
5.6.140.0070.08018.20
5.6.130.0170.06018.21
5.6.120.0070.05321.05
5.6.110.0070.06720.97
5.6.100.0070.08321.01
5.6.90.0100.07320.97
5.6.80.0070.08320.48
5.5.350.0230.07720.46
5.5.340.0030.07717.87
5.5.330.0070.08720.29
5.5.320.0200.05020.24
5.5.310.0200.06320.17
5.5.300.0000.08717.98
5.5.290.0070.05717.91
5.5.280.0070.03720.73
5.5.270.0100.05320.88
5.5.260.0070.08720.88
5.5.250.0030.08320.67
5.5.240.3970.04320.18

preferences:
69.15 ms | 401 KiB | 5 Q