3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nightStart = '23:00:00'; $nightEnd = '05:00:00'; $tripStart = new DateTime('2013-01-09 22:00:00'); $tripEnd = new DateTime('2013-01-10 00:00:00'); $now = new DateTime('now'); $today = $now->format('Y-m-d'); $nightTodayStart = new DateTime($today . $nightStart); $dayFare = $nightTodayStart->diff($tripStart); var_dump($dayFare); $nightFare = $tripEnd->diff($nightTodayStart); var_dump($nightFare); ?>

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.70.0070.01118.43
8.3.60.0150.00318.55
8.3.50.0090.01122.00
8.3.40.0040.01219.00
8.3.30.0110.00319.09
8.3.20.0080.00020.34
8.3.10.0080.00021.84
8.3.00.0040.00422.46
8.2.190.0140.00716.63
8.2.180.0120.00616.75
8.2.170.0120.00322.96
8.2.160.0060.00921.14
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.49
8.2.110.0030.00719.29
8.2.100.0060.00617.91
8.2.90.0030.00519.40
8.2.80.0040.00417.97
8.2.70.0080.00017.73
8.2.60.0030.00517.93
8.2.50.0050.00318.07
8.2.40.0050.00318.16
8.2.30.0040.00418.07
8.2.20.0000.00717.93
8.2.10.0020.00518.02
8.2.00.0060.00317.84
8.1.280.0220.00025.92
8.1.270.0050.00321.94
8.1.260.0040.00426.35
8.1.250.0090.00928.09
8.1.240.0070.00321.44
8.1.230.0040.00817.64
8.1.220.0040.00417.91
8.1.210.0050.00318.77
8.1.200.0000.01017.48
8.1.190.0000.00817.47
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0000.00821.99
8.1.150.0040.00418.67
8.1.140.0070.00417.48
8.1.130.0070.00017.84
8.1.120.0070.00017.60
8.1.110.0080.00017.62
8.1.100.0030.00417.68
8.1.90.0000.00717.53
8.1.80.0000.00717.58
8.1.70.0040.00417.58
8.1.60.0000.00917.63
8.1.50.0040.00417.50
8.1.40.0040.00417.46
8.1.30.0060.00317.69
8.1.20.0040.00417.64
8.1.10.0040.00417.67
8.1.00.0040.00417.75
8.0.300.0040.00818.77
8.0.290.0040.00416.88
8.0.280.0030.00318.54
8.0.270.0070.00017.23
8.0.260.0030.00316.92
8.0.250.0030.00317.17
8.0.240.0040.00417.15
8.0.230.0000.00717.07
8.0.220.0040.00417.11
8.0.210.0030.00316.99
8.0.200.0030.00317.02
8.0.190.0000.00717.17
8.0.180.0040.00417.05
8.0.170.0040.00417.10
8.0.160.0050.00317.13
8.0.150.0050.00316.96
8.0.140.0070.00017.10
8.0.130.0060.00013.51
8.0.120.0000.00817.09
8.0.110.0000.00717.10
8.0.100.0050.00216.98
8.0.90.0000.00717.06
8.0.80.0090.00617.18
8.0.70.0040.00417.11
8.0.60.0000.00716.98
8.0.50.0000.00817.03
8.0.30.0200.00617.24
8.0.20.0070.01217.45
8.0.10.0050.00317.24
8.0.00.0080.01016.88
7.4.330.0050.00015.01
7.4.320.0000.00716.51
7.4.300.0000.00616.59
7.4.290.0000.00816.70
7.4.280.0030.00316.69
7.4.270.0070.00016.54
7.4.260.0000.00716.45
7.4.250.0050.00216.62
7.4.240.0020.00516.63
7.4.230.0030.00316.45
7.4.220.0000.02016.64
7.4.210.0090.00716.66
7.4.200.0030.00316.68
7.4.190.0000.00716.56
7.4.160.0080.01016.71
7.4.150.0100.01117.40
7.4.140.0150.00617.86
7.4.130.0060.01316.51
7.4.120.0120.00616.71
7.4.110.0070.01116.67
7.4.100.0150.00416.79
7.4.90.0110.00816.62
7.4.80.0100.01019.39
7.4.70.0140.00816.66
7.4.60.0100.00616.71
7.4.50.0000.00716.46
7.4.40.0030.01022.77
7.4.30.0070.01016.51
7.4.00.0060.01015.03
7.3.330.0060.00013.28
7.3.320.0040.00313.25
7.3.310.0000.00716.19
7.3.300.0070.00016.23
7.3.290.0120.00916.32
7.3.280.0070.01116.39
7.3.270.0090.00917.40
7.3.260.0110.01616.37
7.3.250.0160.00216.51
7.3.240.0170.00316.48
7.3.230.0140.00716.61
7.3.210.0040.01416.58
7.3.200.0120.00819.39
7.3.190.0170.00616.39
7.3.180.0100.00716.52
7.3.170.0190.00416.38
7.3.160.0060.01016.37
7.3.120.0070.00715.09
7.2.330.0100.01016.52
7.2.320.0140.00716.65
7.2.310.0130.00816.55
7.2.300.0090.01316.64
7.2.290.0150.00416.61
7.2.60.0130.00316.75
7.2.00.0030.00719.45
7.1.200.0030.01015.64
7.1.100.0040.00818.14
7.1.70.0050.00217.30
7.1.60.0090.00919.82
7.1.50.0040.00716.89
7.1.00.0000.08022.30
7.0.200.0070.01116.68
7.0.140.0000.07321.96
7.0.60.0130.05319.89
7.0.50.0030.04017.88
7.0.40.0070.09320.20
7.0.30.0300.06020.09
7.0.20.0130.05320.17
7.0.10.0200.07320.09
7.0.00.0100.09020.20
5.6.280.0030.07021.08
5.6.210.0000.06720.76
5.6.200.0030.09318.12
5.6.190.0000.04720.36
5.6.180.0100.04720.37
5.6.170.0170.08320.48
5.6.160.0030.07320.51
5.6.150.0070.08318.18
5.6.140.0270.04718.07
5.6.130.0070.08018.21
5.6.120.0030.06321.14
5.6.110.0030.09321.13
5.6.100.0230.06721.12
5.6.90.0000.04321.00
5.6.80.0000.04020.36
5.5.350.0070.08020.41
5.5.340.0030.04317.88
5.5.330.0070.05320.43
5.5.320.0400.03720.21
5.5.310.0170.08020.14
5.5.300.0070.06317.96
5.5.290.0170.06717.88
5.5.280.0130.07320.76
5.5.270.0070.04320.75
5.5.260.0070.07720.86
5.5.250.0030.08320.57
5.5.240.0200.07720.23
5.4.450.0300.07019.46
5.4.440.0270.03319.43
5.4.430.0170.04019.54
5.4.420.0200.05719.40
5.4.410.0230.03319.12
5.4.400.0230.03019.05
5.4.390.0200.03718.92
5.4.380.0200.07018.79
5.4.370.0230.03719.09
5.4.360.0200.03719.08
5.4.350.0270.07718.92
5.4.340.0200.03719.10
5.4.320.0200.03719.08
5.4.310.0230.04319.21
5.4.300.0300.03719.08
5.4.290.0200.04719.09
5.4.280.0270.07019.08
5.4.270.0230.06019.08
5.4.260.0230.03719.21
5.4.250.0230.03319.05
5.4.240.0300.06318.74
5.4.230.0230.04019.06
5.4.220.0200.03718.91
5.4.210.0230.03319.18
5.4.200.0230.03318.80
5.4.190.0230.04019.17
5.4.180.0270.06719.05
5.4.170.0230.03319.09
5.4.160.0200.03719.06
5.4.150.0230.03319.10
5.4.140.0300.05716.50
5.4.130.0170.04316.32
5.4.120.0170.03716.48
5.4.110.0230.04016.55
5.4.100.0170.04016.44
5.4.90.0200.05716.36
5.4.80.0230.03016.45
5.4.70.0300.05316.44
5.4.60.0200.07316.44
5.4.50.0200.03716.36
5.4.40.0200.03316.37
5.4.30.0170.03716.43
5.4.20.0200.03316.38
5.4.10.0200.03316.38
5.4.00.0270.03015.78
5.3.290.0230.03314.58
5.3.280.0200.03714.51
5.3.270.0130.08714.57
5.3.260.0200.03714.59
5.3.250.0270.07314.66
5.3.240.0300.06314.46
5.3.230.0300.07014.45
5.3.220.0200.03314.41
5.3.210.0330.03714.60
5.3.200.0230.04014.51
5.3.190.0200.04014.43
5.3.180.0270.06714.62
5.3.170.0200.03714.41
5.3.160.0230.04014.52
5.3.150.0200.03314.60
5.3.140.0170.03714.59
5.3.130.0230.03314.41
5.3.120.0200.04714.48
5.3.110.0270.05714.41
5.3.100.0270.07714.07
5.3.90.0200.03714.11
5.3.80.0170.03714.06
5.3.70.0200.07313.95
5.3.60.0170.03714.04
5.3.50.0230.03014.04
5.3.40.0200.03713.82
5.3.30.0270.03013.71
5.3.20.0170.07713.65
5.3.10.0170.03713.64
5.3.00.0230.04013.55
5.2.170.0130.03311.20
5.2.160.0130.04011.00
5.2.150.0200.02711.18
5.2.140.0270.03711.04
5.2.130.0200.04311.15
5.2.120.0200.03011.02
5.2.110.0200.05010.93
5.2.100.0200.02711.00
5.2.90.0130.03011.27
5.2.80.0130.03011.04
5.2.70.0130.03010.95
5.2.60.0130.03011.10
5.2.50.0200.05311.18
5.2.40.0170.03010.85
5.2.30.0130.03310.83
5.2.20.0100.03310.90
5.2.10.0170.05710.76
5.2.00.0200.02710.73
5.1.60.0200.04710.73
5.1.50.0130.05010.73
5.1.40.0130.02310.73
5.1.30.0130.02310.73
5.1.20.0100.04710.73
5.1.10.0130.02310.73
5.1.00.0130.02710.73
5.0.50.0070.02010.73
5.0.40.0070.02010.73
5.0.30.0100.02710.73
5.0.20.0170.01310.73
5.0.10.0070.02010.73
5.0.00.0070.03010.73
4.4.90.0070.01710.73
4.4.80.0100.01710.73
4.4.70.0070.01710.73
4.4.60.0030.02310.73
4.4.50.0100.03310.73
4.4.40.0100.03010.73
4.4.30.0130.02710.73
4.4.20.0030.01710.73
4.4.10.0030.01710.73
4.4.00.0030.03010.73
4.3.110.0030.01710.73
4.3.100.0030.01710.73
4.3.90.0070.01710.73
4.3.80.0100.02310.73
4.3.70.0070.01310.73
4.3.60.0030.01710.73
4.3.50.0070.01310.73
4.3.40.0030.02310.73
4.3.30.0030.01710.73
4.3.20.0000.01710.73
4.3.10.0030.01310.73
4.3.00.0000.01710.73

preferences:
41.33 ms | 401 KiB | 5 Q