3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($dateAdded,$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"; } } $now = new Datetime('now'); echo "Now:" . $now->format('H:n:s').'\n\n'; check(new DateTime('- 13 seconds'),$now); check(new DateTime('- 13 minutes'),$now); check(new DateTime('- 100 minutes'),$now); check(new DateTime('- 125 minutes'),$now);

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.0040.01118.68
8.3.50.0110.00722.04
8.3.40.0070.01018.88
8.3.30.0080.00619.04
8.3.20.0040.00420.20
8.3.10.0020.00521.94
8.3.00.0080.00019.51
8.2.180.0170.00316.75
8.2.170.0070.00722.96
8.2.160.0100.00720.22
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00418.85
8.2.110.0030.00621.02
8.2.100.0080.00418.03
8.2.90.0050.00318.15
8.2.80.0090.00017.97
8.2.70.0080.00017.75
8.2.60.0030.00618.16
8.2.50.0030.00518.07
8.2.40.0050.00318.34
8.2.30.0000.00718.09
8.2.20.0000.00717.84
8.2.10.0030.00518.13
8.2.00.0040.00418.03
8.1.280.0180.00025.92
8.1.270.0060.00322.20
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.01022.79
8.1.230.0040.00820.85
8.1.220.0000.00817.80
8.1.210.0030.00618.85
8.1.200.0040.00517.48
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0030.00518.83
8.1.160.0040.00422.23
8.1.150.0040.00419.04
8.1.140.0080.00017.61
8.1.130.0000.00717.99
8.1.120.0040.00417.77
8.1.110.0050.00317.76
8.1.100.0040.00417.79
8.1.90.0050.00217.73
8.1.80.0050.00317.63
8.1.70.0000.00717.68
8.1.60.0090.00017.73
8.1.50.0000.00817.62
8.1.40.0060.00317.64
8.1.30.0050.00317.76
8.1.20.0040.00417.83
8.1.10.0000.00917.66
8.1.00.0000.00817.62
8.0.300.0070.00020.07
8.0.290.0000.00817.00
8.0.280.0040.00418.61
8.0.270.0000.00817.43
8.0.260.0030.00317.30
8.0.250.0070.00017.28
8.0.240.0080.00017.13
8.0.230.0040.00417.16
8.0.220.0040.00417.10
8.0.210.0030.00317.24
8.0.200.0070.00017.16
8.0.190.0050.00217.14
8.0.180.0040.00417.23
8.0.170.0050.00317.17
8.0.160.0000.00717.20
8.0.150.0000.00817.02
8.0.140.0040.00417.14
8.0.130.0030.00313.53
8.0.120.0050.00317.04
8.0.110.0000.00717.21
8.0.100.0000.00817.23
8.0.90.0000.00717.02
8.0.80.0110.00717.12
8.0.70.0060.00317.19
8.0.60.0030.00517.18
8.0.50.0000.00717.14
8.0.30.0040.01617.31
8.0.20.0140.00617.40
8.0.10.0040.00417.19
8.0.00.0140.00617.05
7.4.330.0030.00315.21
7.4.320.0080.00016.79
7.4.300.0060.00016.84
7.4.290.0030.00316.81
7.4.280.0050.00216.76
7.4.270.0070.00016.88
7.4.260.0030.00316.61
7.4.250.0000.00716.79
7.4.240.0040.00316.78
7.4.230.0030.00316.81
7.4.220.0120.00616.68
7.4.210.0110.00716.75
7.4.200.0050.00216.76
7.4.160.0070.01016.83
7.4.150.0120.01317.40
7.4.140.0130.01117.86
7.4.130.0080.01016.64
7.4.120.0080.00916.77
7.4.110.0070.01016.83
7.4.100.0100.00716.79
7.4.90.0120.00616.89
7.4.80.0120.01219.39
7.4.70.0040.01716.88
7.4.60.0100.00616.84
7.4.50.0050.00316.87
7.4.40.0180.00316.88
7.4.30.0120.00616.67
7.4.00.0030.00614.88
7.3.330.0000.00713.45
7.3.320.0060.00013.50
7.3.310.0040.00416.39
7.3.300.0000.00716.46
7.3.290.0030.01216.45
7.3.280.0080.00616.45
7.3.270.0080.01317.40
7.3.260.0130.00616.67
7.3.250.0080.01016.57
7.3.240.0030.01416.85
7.3.230.0060.01316.77
7.3.210.0070.01116.69
7.3.200.0090.01519.39
7.3.190.0070.01416.70
7.3.180.0080.00816.69
7.3.170.0000.01716.62
7.3.160.0130.00316.67
7.3.10.0150.00016.94
7.3.00.0110.00416.74
7.2.330.0070.01016.80
7.2.320.0100.00617.01
7.2.310.0090.01916.97
7.2.300.0030.01316.79
7.2.290.0160.00817.05
7.2.130.0060.00917.20
7.2.120.0100.00716.95
7.2.110.0000.01517.08
7.2.100.0030.00617.29
7.2.90.0040.01117.19
7.2.80.0050.00817.09
7.2.70.0120.00317.09
7.2.60.0080.00617.04
7.2.50.0070.00717.00
7.2.40.0040.00717.27
7.2.30.0110.00716.96
7.2.20.0060.00617.27
7.2.10.0060.00917.16
7.2.00.0050.00918.54
7.1.250.0040.00716.25
7.1.200.0030.01415.99
7.1.100.0030.00718.34
7.1.70.0000.01517.27
7.1.60.0090.01619.32
7.1.50.0130.00716.94
7.1.00.0000.08022.37
7.0.200.0000.01016.76
7.0.140.0070.06721.98
7.0.60.0070.03719.96
7.0.50.0070.06317.80
7.0.40.0030.04720.21
7.0.30.0430.06720.08
7.0.20.0400.07020.18
7.0.10.0100.07320.12
7.0.00.0100.08020.33
5.6.280.0000.07720.82
5.6.210.0130.07720.50
5.6.200.0030.04318.27
5.6.190.0070.08720.67
5.6.180.0430.08020.50
5.6.170.0230.04320.48
5.6.160.0070.05720.71
5.6.150.0300.05318.21
5.6.140.0100.07718.21
5.6.130.0100.05318.27
5.6.120.0070.08020.95
5.6.110.0170.08021.03
5.6.100.0000.06321.00
5.6.90.0100.08021.08
5.6.80.0070.08020.54
5.5.350.0070.03320.30
5.5.340.0070.08017.91
5.5.330.0070.05320.37
5.5.320.0530.04320.35
5.5.310.0500.06320.33
5.5.300.0100.08017.93
5.5.290.0030.05018.06
5.5.280.0000.06020.94
5.5.270.0070.07720.64
5.5.260.0170.07320.65
5.5.250.0130.07020.71
5.5.240.0230.02720.13
5.4.450.0270.04719.17
5.4.440.0670.04019.48
5.4.430.0330.03019.27
5.4.420.0670.00019.52
5.4.410.0670.00019.40
5.4.400.0600.00019.09
5.4.390.0600.00019.16
5.4.380.0630.00019.09
5.4.370.0630.00019.04
5.4.360.0600.00019.02
5.4.350.0670.00019.12
5.4.340.0670.00019.11
5.4.320.0070.03512.50
5.4.310.0060.03712.50
5.4.300.0050.03612.51
5.4.290.0040.03912.50
5.4.280.0050.03612.40
5.4.270.0050.04212.40
5.4.260.0050.04012.40
5.4.250.0060.03812.40
5.4.240.0080.03412.40
5.4.230.0060.03912.39
5.4.220.0030.04012.39
5.4.210.0060.03512.39
5.4.200.0090.03412.39
5.4.190.0090.03712.39
5.4.180.0060.03612.38
5.4.170.0080.03412.39
5.4.160.0070.03512.39
5.4.150.0090.03312.39
5.4.140.0050.04012.07
5.4.130.0040.03712.05
5.4.120.0080.03312.01
5.4.110.0040.03912.02
5.4.100.0070.03512.01
5.4.90.0050.04412.02
5.4.80.0060.03912.01
5.4.70.0070.03512.01
5.4.60.0070.03412.00
5.4.50.0080.03512.01
5.4.40.0050.03612.00
5.4.30.0040.03911.99
5.4.20.0080.03311.99
5.4.10.0050.03611.99
5.4.00.0080.03811.48
5.3.290.0070.03912.80
5.3.280.0070.03712.71
5.3.270.0030.04212.72
5.3.260.0050.04212.72
5.3.250.0050.03912.72
5.3.240.0070.03712.72
5.3.230.0070.03712.71
5.3.220.0060.03712.68
5.3.210.0060.03812.68
5.3.200.0100.04512.68
5.3.190.0060.04012.68
5.3.180.0060.03612.67
5.3.170.0060.03812.67
5.3.160.0070.03512.67
5.3.150.0080.03412.68
5.3.140.0060.03712.66
5.3.130.0080.03812.66
5.3.120.0040.04112.66
5.3.110.0080.03612.65
5.3.100.0080.03512.12
5.3.90.0050.03812.11
5.3.80.0070.03612.09
5.3.70.0060.03612.09
5.3.60.0070.03412.08
5.3.50.0090.04812.02
5.3.40.0070.04212.02
5.3.30.0050.03711.99
5.3.20.0070.03511.77
5.3.10.0060.03711.73
5.3.00.0060.03911.72
5.2.170.0060.0299.23
5.2.160.0030.0339.22
5.2.150.0030.0359.22
5.2.140.0040.0379.22
5.2.130.0030.0319.18
5.2.120.0070.0279.18
5.2.110.0050.0299.18
5.2.100.0030.0339.18
5.2.90.0060.0299.19
5.2.80.0030.0329.18
5.2.70.0050.0299.18
5.2.60.0030.0319.14
5.2.50.0030.0319.10
5.2.40.0070.0279.08
5.2.30.0060.0319.05
5.2.20.0080.0389.05
5.2.10.0040.0308.95
5.2.00.0060.0328.81
5.1.60.0030.0258.09
5.1.50.0050.0288.09
5.1.40.0050.0258.07
5.1.30.0040.0278.42
5.1.20.0080.0248.44
5.1.10.0040.0268.17
5.1.00.0030.0278.17
5.0.50.0050.0256.64
5.0.40.0010.0216.50
5.0.30.0030.0316.32
5.0.20.0020.0216.29
5.0.10.0030.0206.27
5.0.00.0020.0326.26
4.4.90.0040.0144.78
4.4.80.0030.0154.75
4.4.70.0040.0144.75
4.4.60.0010.0174.75
4.4.50.0040.0144.77
4.4.40.0030.0244.71
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0030.0144.85
4.4.00.0030.0244.76
4.3.110.0030.0154.67
4.3.100.0000.0174.66
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0040.0174.63
4.3.40.0030.0294.54
4.3.30.0020.0163.30
4.3.20.0010.0173.28
4.3.10.0020.0153.24
4.3.00.0030.01713.50

preferences:
33.52 ms | 401 KiB | 5 Q