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.0110.01118.43
8.3.50.0090.00616.36
8.3.40.0040.01118.82
8.3.30.0070.00718.82
8.3.20.0040.00420.25
8.3.10.0060.00321.90
8.3.00.0040.00423.52
8.2.180.0070.00716.88
8.2.170.0090.00622.96
8.2.160.0070.00720.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00320.75
8.2.120.0040.00426.35
8.2.110.0090.00019.39
8.2.100.0040.00717.93
8.2.90.0040.00419.22
8.2.80.0030.00617.97
8.2.70.0060.00317.88
8.2.60.0040.00418.16
8.2.50.0060.00318.09
8.2.40.0030.00522.14
8.2.30.0000.00719.51
8.2.20.0000.00817.95
8.2.10.0000.00718.08
8.2.00.0040.00418.12
8.1.280.0140.00725.92
8.1.270.0060.00322.10
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00322.55
8.1.230.0070.00317.89
8.1.220.0080.00017.78
8.1.210.0050.00318.77
8.1.200.0070.00317.60
8.1.190.0030.00517.50
8.1.180.0040.00418.10
8.1.170.0070.00318.83
8.1.160.0050.00220.83
8.1.150.0030.00318.89
8.1.140.0040.00419.53
8.1.130.0070.00017.68
8.1.120.0030.00417.68
8.1.110.0040.00417.62
8.1.100.0000.00817.72
8.1.90.0100.00217.63
8.1.80.0080.00317.65
8.1.70.0050.00317.56
8.1.60.0060.00317.63
8.1.50.0050.00517.66
8.1.40.0070.00317.65
8.1.30.0030.00517.72
8.1.20.0040.00417.68
8.1.10.0040.00417.61
8.1.00.0030.00617.67
8.0.300.0040.00418.78
8.0.290.0040.00416.88
8.0.280.0030.00318.44
8.0.270.0040.00317.34
8.0.260.0000.00717.27
8.0.250.0070.00017.17
8.0.240.0030.00317.18
8.0.230.0030.00317.14
8.0.220.0000.01017.12
8.0.210.0040.00417.07
8.0.200.0070.00017.25
8.0.190.0000.00817.05
8.0.180.0040.00417.02
8.0.170.0030.00517.15
8.0.160.0030.00617.11
8.0.150.0040.00417.02
8.0.140.0070.00017.08
8.0.130.0030.00313.43
8.0.120.0030.00617.04
8.0.110.0000.00717.15
8.0.100.0000.00717.16
8.0.90.0050.00216.97
8.0.80.0060.00917.09
8.0.70.0000.00717.00
8.0.60.0030.00617.06
8.0.50.0030.00617.15
8.0.30.0080.01117.32
8.0.20.0130.00917.50
8.0.10.0000.00717.21
8.0.00.0090.01016.96
7.4.330.0050.00016.67
7.4.320.0040.00416.75
7.4.300.0040.00416.66
7.4.290.0000.00716.75
7.4.280.0000.00816.54
7.4.270.0030.00316.67
7.4.260.0000.00716.69
7.4.250.0050.00216.52
7.4.240.0000.00716.75
7.4.230.0000.00716.75
7.4.220.0140.00716.64
7.4.210.0110.00616.73
7.4.200.0030.00316.65
7.4.160.0070.01116.74
7.4.150.0100.01017.40
7.4.140.0120.00717.86
7.4.130.0120.00916.67
7.4.120.0080.01216.75
7.4.110.0080.01016.71
7.4.100.0110.00616.60
7.4.90.0080.00916.59
7.4.80.0100.00719.39
7.4.70.0150.00916.70
7.4.60.0070.01016.68
7.4.50.0110.00416.83
7.4.40.0030.01416.72
7.4.30.0120.00716.71
7.4.00.0110.00715.02
7.3.330.0030.00313.20
7.3.320.0000.00513.32
7.3.310.0070.00016.44
7.3.300.0030.00316.32
7.3.290.0000.00716.32
7.3.280.0100.00916.44
7.3.270.0070.01017.40
7.3.260.0090.00916.84
7.3.250.0070.01016.66
7.3.240.0090.01116.58
7.3.230.0140.00616.54
7.3.210.0090.00916.41
7.3.200.0070.01119.39
7.3.190.0140.00316.72
7.3.180.0100.01016.43
7.3.170.0000.02216.71
7.3.160.0110.00616.71
7.3.120.0100.01014.66
7.3.110.0100.00715.25
7.3.100.0100.00314.69
7.3.90.0040.01114.79
7.3.80.0090.00614.90
7.3.70.0080.00615.04
7.3.60.0000.01014.85
7.3.50.0030.01314.65
7.3.40.0040.01214.94
7.3.30.0030.00914.90
7.3.20.0060.00916.64
7.3.10.0070.01016.82
7.3.00.0070.01116.86
7.2.330.0090.00916.66
7.2.320.0070.01416.79
7.2.310.0130.00916.88
7.2.300.0090.00916.97
7.2.290.0000.01616.86
7.2.250.0080.00815.29
7.2.240.0090.01215.14
7.2.230.0030.01215.26
7.2.220.0080.00415.21
7.2.210.0080.00315.18
7.2.200.0100.00715.25
7.2.190.0030.01015.34
7.2.180.0100.00615.29
7.2.170.0000.01715.18
7.2.60.0060.00616.98
7.2.00.0070.00719.62
7.1.330.0000.01715.77
7.1.320.0110.00415.81
7.1.310.0090.00015.93
7.1.300.0000.01116.08
7.1.290.0030.01216.01
7.1.280.0000.01315.84
7.1.270.0060.00615.80
7.1.260.0030.01216.08
7.1.200.0030.01015.60
7.1.100.0000.00918.16
7.1.70.0030.00617.41
7.1.60.0060.01919.40
7.1.50.0050.00517.23
7.1.00.0070.07022.43
7.0.200.0390.00914.36
7.0.60.0230.06019.83
7.0.50.0030.04017.79
7.0.40.0030.08719.98
7.0.30.0270.04720.09
7.0.20.0300.05320.09
7.0.10.0070.04720.16
7.0.00.0030.05020.12
5.6.280.0030.03320.76
5.6.210.0070.03720.71
5.6.200.0030.07018.16
5.6.190.0100.06320.57
5.6.180.0270.08020.48
5.6.170.0430.07320.42
5.6.160.0000.09020.50
5.6.150.0030.04018.15
5.6.140.0070.07018.20
5.6.130.0030.05318.21
5.6.120.0070.07020.96
5.6.110.0130.08020.99
5.6.100.0070.08320.97
5.6.90.0000.08721.03
5.6.80.0000.05720.43
5.5.350.0300.07720.29
5.5.340.0070.05718.01
5.5.330.0070.04320.36
5.5.320.0170.08320.17
5.5.310.0430.07020.20
5.5.300.0070.04717.95
5.5.290.0070.07318.02
5.5.280.0000.04320.65
5.5.270.0100.08020.76
5.5.260.0100.07320.76
5.5.250.0070.08020.61
5.5.240.4070.03720.16

preferences:
54.41 ms | 401 KiB | 5 Q