3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check($dateAdded){ $now = new DateTime('now'); $secondsInPast = $now->getTimestamp() - $dateAdded->getTimestamp(); if($secondsInPast > 60*60*2){ echo "Old enough"; } else { echo "Not Old Enough"; } } check(new DateTime('- 13 seconds')); check(new DateTime('- 13 minutes')); check(new DateTime('- 100 minutes')); check(new DateTime('- 125 minutes'));

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.0130.00718.43
8.3.50.0120.00922.02
8.3.40.0060.01218.89
8.3.30.0030.01019.08
8.3.20.0040.00420.30
8.3.10.0030.00521.89
8.3.00.0060.00319.38
8.2.180.0120.00616.63
8.2.170.0070.00722.96
8.2.160.0140.00720.32
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.27
8.2.110.0050.00520.95
8.2.100.0000.01217.84
8.2.90.0000.00817.97
8.2.80.0080.00017.97
8.2.70.0040.00417.88
8.2.60.0030.00618.16
8.2.50.0090.00019.60
8.2.40.0040.00418.34
8.2.30.0070.00018.12
8.2.20.0000.00817.86
8.2.10.0000.00818.22
8.2.00.0040.00417.88
8.1.280.0120.00625.92
8.1.270.0030.00522.18
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0100.00022.66
8.1.230.0060.00620.94
8.1.220.0030.00517.74
8.1.210.0080.00019.04
8.1.200.0000.01017.48
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0080.00018.74
8.1.160.0070.00022.06
8.1.150.0040.00418.92
8.1.140.0000.00817.69
8.1.130.0030.00317.86
8.1.120.0040.00417.58
8.1.110.0040.00417.64
8.1.100.0040.00317.55
8.1.90.0000.00717.64
8.1.80.0040.00317.64
8.1.70.0000.00717.63
8.1.60.0040.00417.69
8.1.50.0000.00817.73
8.1.40.0000.00717.70
8.1.30.0030.00617.82
8.1.20.0000.00817.78
8.1.10.0050.00217.65
8.1.00.0000.00717.63
8.0.300.0000.00820.05
8.0.290.0050.00217.00
8.0.280.0000.00718.64
8.0.270.0030.00317.40
8.0.260.0000.00617.34
8.0.250.0030.00317.04
8.0.240.0000.00717.12
8.0.230.0000.00817.04
8.0.220.0000.00917.16
8.0.210.0000.00717.06
8.0.200.0000.00617.15
8.0.190.0040.00417.18
8.0.180.0040.00417.14
8.0.170.0000.00817.13
8.0.160.0040.00417.04
8.0.150.0000.00817.03
8.0.140.0000.00716.96
8.0.130.0030.00313.45
8.0.120.0000.00717.07
8.0.110.0000.00817.17
8.0.100.0000.00716.93
8.0.90.0000.00816.97
8.0.80.0140.00417.13
8.0.70.0030.00616.95
8.0.60.0000.00716.90
8.0.50.0070.00017.14
8.0.30.0110.00817.33
8.0.20.0150.00617.45
8.0.10.0070.00017.23
8.0.00.0080.00917.13
7.4.330.0000.00515.03
7.4.320.0000.00816.74
7.4.300.0000.00616.66
7.4.290.0070.00016.83
7.4.280.0040.00416.76
7.4.270.0000.00616.81
7.4.260.0030.00316.80
7.4.250.0050.00216.68
7.4.240.0030.00416.76
7.4.230.0000.00716.81
7.4.220.0060.01216.74
7.4.210.0070.01116.84
7.4.200.0070.00016.81
7.4.160.0100.00716.65
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0100.00816.59
7.4.120.0090.00916.74
7.4.110.0090.00916.75
7.4.100.0070.01016.75
7.4.90.0070.01016.64
7.4.80.0140.00319.39
7.4.70.0120.01116.70
7.4.60.0130.00316.70
7.4.50.0030.00616.81
7.4.40.0100.01316.47
7.4.30.0210.00016.61
7.4.00.0130.00314.96
7.3.330.0060.00013.49
7.3.320.0050.00013.57
7.3.310.0000.00716.51
7.3.300.0000.00716.37
7.3.290.0030.01616.50
7.3.280.0060.01016.48
7.3.270.0140.00417.40
7.3.260.0070.01016.66
7.3.250.0120.00516.61
7.3.240.0150.00316.72
7.3.230.0100.01216.68
7.3.210.0240.00016.64
7.3.200.0040.01719.39
7.3.190.0070.01416.59
7.3.180.0070.01016.70
7.3.170.0060.01016.77
7.3.160.0130.00416.75
7.2.330.0070.01016.98
7.2.320.0070.01016.75
7.2.310.0130.00716.73
7.2.300.0070.01016.65
7.2.290.0110.00716.68
7.2.00.0030.01219.80
7.1.100.0030.01018.35
7.1.70.0070.00017.41
7.1.60.0140.01019.32
7.1.50.0000.01917.11
7.1.00.0030.07722.49
7.0.200.0150.01015.21
7.0.140.0030.06722.00
7.0.60.0130.07719.92
7.0.50.0000.04317.90
7.0.40.0030.07720.39
7.0.30.2270.03720.32
7.0.20.0230.03720.05
7.0.10.0200.04720.34
7.0.00.0000.08320.11
5.6.280.0030.07320.86
5.6.210.0130.05720.47
5.6.200.0030.05018.14
5.6.190.0130.07320.64
5.6.180.0030.08020.67
5.6.170.0170.04020.50
5.6.160.0030.04020.56
5.6.150.0000.05018.15
5.6.140.0170.06318.18
5.6.130.0070.08718.28
5.6.120.0130.08021.05
5.6.110.0030.04021.03
5.6.100.0070.08021.04
5.6.90.0070.08721.09
5.6.80.0170.07020.36
5.6.70.0200.05320.53
5.5.350.0030.03720.36
5.5.340.0000.09017.96
5.5.330.0070.04020.19
5.5.320.0100.04320.24
5.5.310.0370.07320.34
5.5.300.0030.05718.05
5.5.290.0230.06018.09
5.5.280.0170.06720.97
5.5.270.0100.07320.75
5.5.260.0030.06720.94
5.5.250.0070.04020.58
5.5.240.0130.07720.36
5.4.450.0400.03719.43
5.4.440.0700.04019.38
5.4.430.0500.04019.54
5.4.420.0630.00019.21
5.4.410.0830.00019.28
5.4.400.0630.00019.03
5.4.390.0630.00019.09
5.4.380.0630.00019.03
5.4.370.0630.00019.11
5.4.360.0630.00019.03
5.4.350.0630.00019.16
5.4.340.0630.00019.06
5.4.320.0080.03412.50
5.4.310.0060.04312.50
5.4.300.0050.03812.51
5.4.290.0040.04012.50
5.4.280.0070.03512.40
5.4.270.0060.03712.40
5.4.260.0060.03712.39
5.4.250.0090.05512.39
5.4.240.0020.04012.40
5.4.230.0060.03712.39
5.4.220.0100.03312.39
5.4.210.0060.03412.39
5.4.200.0070.03612.39
5.4.190.0110.03012.38
5.4.180.0050.03612.38
5.4.170.0040.03712.39
5.4.160.0030.03812.39
5.4.150.0040.03712.39
5.4.140.0040.03812.07
5.4.130.0070.03512.06
5.4.120.0060.03412.02
5.4.110.0040.03712.01
5.4.100.0090.03512.02
5.4.90.0080.03612.01
5.4.80.0100.03212.01
5.4.70.0050.03512.01
5.4.60.0010.04012.01
5.4.50.0040.03812.00
5.4.40.0040.04012.00
5.4.30.0100.03011.99
5.4.20.0040.03612.00
5.4.10.0040.03512.00
5.4.00.0050.03711.48
5.3.290.0050.04112.80
5.3.280.0050.03912.71
5.3.270.0100.05312.72
5.3.260.0070.04012.72
5.3.250.0100.05012.72
5.3.240.0040.03912.72
5.3.230.0090.05312.71
5.3.220.0070.04612.68
5.3.210.0070.04012.68
5.3.200.0060.04012.68
5.3.190.0050.03712.68
5.3.180.0070.03412.67
5.3.170.0050.03912.67
5.3.160.0060.03712.67
5.3.150.0070.03712.67
5.3.140.0060.03712.66
5.3.130.0070.03812.65
5.3.120.0080.03712.65
5.3.110.0030.04312.66
5.3.100.0070.04212.12
5.3.90.0060.03712.11
5.3.80.0110.03812.09
5.3.70.0040.03912.09
5.3.60.0070.03512.07
5.3.50.0060.03612.02
5.3.40.0050.03912.02
5.3.30.0070.03411.98
5.3.20.0090.03511.77
5.3.10.0090.03111.73
5.3.00.0110.03611.73
5.2.170.0060.0289.23
5.2.160.0050.0289.22
5.2.150.0050.0309.23
5.2.140.0060.0289.22
5.2.130.0030.0309.18
5.2.120.0030.0299.18
5.2.110.0050.0339.19
5.2.100.0050.0309.19
5.2.90.0040.0299.19
5.2.80.0050.0309.18
5.2.70.0040.0339.18
5.2.60.0050.0309.14
5.2.50.0060.0299.10
5.2.40.0040.0299.08
5.2.30.0050.0309.05
5.2.20.0060.0279.04
5.2.10.0050.0278.96
5.2.00.0030.0308.81
5.1.60.0040.0268.09
5.1.50.0060.0238.09
5.1.40.0030.0308.07
5.1.30.0020.0288.42
5.1.20.0040.0278.44
5.1.10.0040.0258.16
5.1.00.0050.0268.16
5.0.50.0040.0206.64
5.0.40.0010.0216.50
5.0.30.0040.0306.32
5.0.20.0030.0196.29
5.0.10.0020.0216.26
5.0.00.0020.0316.25
4.4.90.0040.0134.78
4.4.80.0010.0164.75
4.4.70.0020.0164.75
4.4.60.0080.0214.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0010.0174.76
4.4.20.0020.0214.84
4.4.10.0040.0214.85
4.4.00.0040.0244.76
4.3.110.0010.0174.67
4.3.100.0020.0154.67
4.3.90.0020.0154.63
4.3.80.0020.0254.58
4.3.70.0010.0164.63
4.3.60.0040.0144.63
4.3.50.0030.0154.63
4.3.40.0020.0254.54
4.3.30.0010.0173.30
4.3.20.0020.0163.28
4.3.10.0000.0173.24
4.3.00.0070.01013.50

preferences:
42.78 ms | 401 KiB | 5 Q