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"; 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.0090.00616.88
8.3.50.0040.01116.61
8.3.40.0110.00718.73
8.3.30.0110.00318.85
8.3.20.0050.00220.36
8.3.10.0080.00021.68
8.3.00.0090.00021.85
8.2.180.0000.01516.88
8.2.170.0100.01022.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.84
8.2.120.0000.00826.35
8.2.110.0060.00319.30
8.2.100.0040.00817.93
8.2.90.0030.00519.20
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0040.00418.05
8.2.50.0050.00318.09
8.2.40.0040.00422.29
8.2.30.0030.00319.51
8.2.20.0040.00417.95
8.2.10.0060.00318.26
8.2.00.0070.00018.14
8.1.280.0070.01425.92
8.1.270.0100.00022.01
8.1.260.0070.00028.09
8.1.250.0030.00628.09
8.1.240.0060.00322.48
8.1.230.0040.00817.77
8.1.220.0050.00317.80
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0000.00817.48
8.1.180.0030.00518.10
8.1.170.0060.00318.59
8.1.160.0070.00020.83
8.1.150.0030.00518.90
8.1.140.0000.00819.53
8.1.130.0000.00817.73
8.1.120.0040.00417.59
8.1.110.0050.00317.54
8.1.100.0000.00717.54
8.1.90.0070.00317.62
8.1.80.0000.01017.65
8.1.70.0030.00317.56
8.1.60.0060.00317.73
8.1.50.0030.00617.73
8.1.40.0030.00517.71
8.1.30.0080.00017.80
8.1.20.0060.00317.81
8.1.10.0040.00417.74
8.1.00.0040.00417.72
8.0.300.0060.00318.79
8.0.290.0040.00416.88
8.0.280.0070.00018.51
8.0.270.0030.00317.28
8.0.260.0000.00717.34
8.0.250.0000.00717.18
8.0.240.0000.00717.19
8.0.230.0000.00717.22
8.0.220.0070.00317.01
8.0.210.0070.00017.08
8.0.200.0070.00017.02
8.0.190.0000.00817.16
8.0.180.0040.00417.16
8.0.170.0070.00017.00
8.0.160.0040.00417.06
8.0.150.0000.00717.04
8.0.140.0030.00317.13
8.0.130.0000.00513.41
8.0.120.0030.00517.10
8.0.110.0030.00517.02
8.0.100.0040.00317.14
8.0.90.0000.00817.09
8.0.80.0030.01317.15
8.0.70.0040.00417.03
8.0.60.0040.00416.90
8.0.50.0040.00417.14
8.0.30.0100.00717.22
8.0.20.0110.00917.41
8.0.10.0000.00817.21
8.0.00.0080.00916.94
7.4.330.0000.00516.79
7.4.320.0000.00716.73
7.4.300.0040.00416.61
7.4.290.0030.00316.74
7.4.280.0000.00716.64
7.4.270.0000.00716.74
7.4.260.0040.00416.65
7.4.250.0070.00016.71
7.4.240.0000.00816.68
7.4.230.0000.00716.84
7.4.220.0060.01216.75
7.4.210.0060.00916.74
7.4.200.0030.00316.78
7.4.160.0060.01516.87
7.4.150.0070.01117.40
7.4.140.0140.00417.86
7.4.130.0110.01116.65
7.4.120.0080.00916.67
7.4.110.0080.01616.74
7.4.100.0090.00916.85
7.4.90.0090.01016.68
7.4.80.0030.01419.39
7.4.70.0100.01416.58
7.4.60.0030.01216.49
7.4.50.0090.00616.92
7.4.40.0130.00616.67
7.4.30.0090.01216.59
7.4.00.0110.00715.00
7.3.330.0000.00613.20
7.3.320.0030.00313.42
7.3.310.0000.00616.47
7.3.300.0070.00016.44
7.3.290.0000.00716.43
7.3.280.0100.00716.43
7.3.270.0120.00617.40
7.3.260.0060.01316.63
7.3.250.0050.01216.56
7.3.240.0070.01016.56
7.3.230.0040.01516.76
7.3.210.0130.00716.53
7.3.200.0100.00719.39
7.3.190.0120.00716.70
7.3.180.0080.00916.77
7.3.170.0070.01016.47
7.3.160.0060.01016.56
7.2.330.0070.01116.98
7.2.320.0030.01916.51
7.2.310.0060.01016.92
7.2.300.0190.00616.86
7.2.290.0030.01316.91
7.2.60.0030.01016.91
7.2.00.0080.00419.61
7.1.200.0040.00416.00
7.1.100.0000.01418.34
7.1.70.0030.00317.35
7.1.60.0190.00619.40
7.1.50.0030.00717.25
7.1.00.0100.07022.37
7.0.200.0400.00715.02
7.0.60.0270.06719.96
7.0.50.0030.04017.90
7.0.40.0030.09320.24
7.0.30.0200.08020.31
7.0.20.0400.07320.01
7.0.10.0100.07019.99
7.0.00.0030.04320.09
5.6.280.0030.04021.14
5.6.210.0070.03720.54
5.6.200.0000.06318.23
5.6.190.0130.06020.77
5.6.180.0230.04320.39
5.6.170.0430.06320.28
5.6.160.0100.07020.33
5.6.150.0070.08718.21
5.6.140.0070.05718.18
5.6.130.0030.04318.18
5.6.120.0200.07321.01
5.6.110.0030.06321.04
5.6.100.0030.08320.97
5.6.90.0170.07021.01
5.6.80.0000.08720.40
5.5.350.0300.07720.34
5.5.340.0070.05718.01
5.5.330.0030.08720.46
5.5.320.0200.07720.32
5.5.310.0330.07720.50
5.5.300.0130.06317.92
5.5.290.0000.04718.02
5.5.280.0070.03720.98
5.5.270.0070.08720.95
5.5.260.0100.06020.95
5.5.250.0100.08020.71
5.5.240.4130.04720.26

preferences:
57.24 ms | 400 KiB | 5 Q