3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add($first, $second) { $firstParsed = date_parse($first); $secondParsed = date_parse($second); $firstTotalMinutes = $firstParsed['hour'] * 60 + $firstParsed['minute']; $secondTotalMinutes = $secondParsed['hour'] * 60 + $secondParsed['minute']; $totalMinutes = $firstTotalMinutes + $secondTotalMinutes; $hours = (int)($totalMinutes / 60); $minutes = $totalMinutes % 60; return sprintf('%02d:%02d', $hours, $minutes); } echo add('01:30', '05:30');

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.0140.00418.55
8.3.50.0120.00616.61
8.3.40.0100.01018.79
8.3.30.0110.00318.84
8.3.20.0050.00318.90
8.3.10.0080.00021.77
8.3.00.0050.00318.00
8.2.180.0140.00418.41
8.2.170.0070.00722.96
8.2.160.0120.00620.98
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0080.00018.03
8.2.120.0000.00826.35
8.2.110.0050.00519.30
8.2.100.0070.00417.88
8.2.90.0000.00819.34
8.2.80.0000.00817.97
8.2.70.0040.00417.88
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0000.00819.77
8.2.30.0020.00518.23
8.2.20.0000.00817.88
8.2.10.0030.00518.11
8.2.00.0040.00418.12
8.1.280.0140.00025.92
8.1.270.0060.00323.63
8.1.260.0070.00028.09
8.1.250.0000.00828.09
8.1.240.0060.00322.48
8.1.230.0060.00617.60
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0000.00817.47
8.1.180.0090.00018.10
8.1.170.0040.00418.71
8.1.160.0040.00421.93
8.1.150.0080.00018.74
8.1.140.0040.00419.52
8.1.130.0030.00317.65
8.1.120.0040.00417.55
8.1.110.0000.00717.52
8.1.100.0000.00817.62
8.1.90.0000.00717.56
8.1.80.0040.00317.48
8.1.70.0040.00417.55
8.1.60.0050.00317.68
8.1.50.0000.00817.57
8.1.40.0000.00817.47
8.1.30.0030.00517.66
8.1.20.0030.00517.61
8.1.10.0080.00017.55
8.1.00.0070.00017.57
8.0.300.0060.00318.77
8.0.290.0000.00816.88
8.0.280.0030.00318.32
8.0.270.0050.00217.25
8.0.260.0040.00417.21
8.0.250.0000.00817.11
8.0.240.0000.00717.11
8.0.230.0050.00217.04
8.0.220.0000.00717.02
8.0.210.0080.00017.04
8.0.200.0000.00717.08
8.0.190.0000.00716.98
8.0.180.0040.00417.10
8.0.170.0030.00617.08
8.0.160.0030.00317.13
8.0.150.0000.00717.00
8.0.140.0050.00216.94
8.0.130.0030.00313.40
8.0.120.0000.00816.91
8.0.110.0040.00416.98
8.0.100.0000.00716.84
8.0.90.0000.00716.93
8.0.80.0040.01116.90
8.0.70.0030.00617.06
8.0.60.0050.00216.92
8.0.50.0000.00717.03
8.0.30.0130.01017.14
8.0.20.0130.00617.40
8.0.10.0000.00917.01
8.0.00.0090.00916.79
7.4.330.0030.00315.08
7.4.320.0070.00016.59
7.4.300.0030.00316.59
7.4.290.0030.00316.67
7.4.280.0050.00316.57
7.4.270.0030.00316.47
7.4.260.0070.00016.62
7.4.250.0000.00716.66
7.4.240.0050.00316.72
7.4.230.0030.00316.72
7.4.220.0070.01616.55
7.4.210.0100.01316.67
7.4.200.0000.00716.67
7.4.160.0080.00816.55
7.4.150.0100.01017.40
7.4.140.0090.01217.86
7.4.130.0120.00716.59
7.4.120.0090.00916.72
7.4.110.0030.01316.64
7.4.100.0080.00816.44
7.4.90.0130.00416.47
7.4.80.0100.00719.39
7.4.70.0070.01316.43
7.4.60.0040.01416.66
7.4.50.0110.00316.64
7.4.40.0130.00316.79
7.4.30.0070.01016.55
7.4.00.0100.00714.93
7.3.330.0000.00513.29
7.3.320.0000.00713.50
7.3.310.0000.00716.47
7.3.300.0030.00316.31
7.3.290.0050.01216.39
7.3.280.0110.00616.45
7.3.270.0040.01817.40
7.3.260.0100.01016.71
7.3.250.0100.01016.50
7.3.240.0130.00516.49
7.3.230.0210.00316.68
7.3.210.0120.01216.36
7.3.200.0100.00716.73
7.3.190.0120.00916.43
7.3.180.0060.00916.71
7.3.170.0090.00916.45
7.3.160.0080.00816.77
7.3.00.0080.00316.93
7.2.330.0090.00916.61
7.2.320.0100.00716.91
7.2.310.0120.00616.95
7.2.300.0090.00616.94
7.2.290.0180.00016.93
7.2.130.0040.00816.76
7.2.120.0080.00017.09
7.2.110.0120.00916.82
7.2.100.0080.00317.05
7.2.90.0030.01216.84
7.2.80.0130.00317.07
7.2.70.0150.00416.93
7.2.60.0090.00617.10
7.2.50.0030.00817.04
7.2.40.0030.01317.00
7.2.30.0030.01217.14
7.2.20.0030.01416.99
7.2.10.0030.00716.89
7.2.00.0040.00918.30
7.1.250.0050.00515.74
7.1.240.0100.00315.61
7.1.230.0040.00416.04
7.1.220.0060.00915.79
7.1.210.0080.00015.97
7.1.200.0060.00815.84
7.1.190.0000.00815.89
7.1.180.0030.00615.95
7.1.170.0140.00015.57
7.1.160.0070.00315.84
7.1.150.0060.00615.98
7.1.140.0040.00715.80
7.1.130.0070.00315.73
7.1.120.0000.01015.71
7.1.110.0030.01015.84
7.1.100.0060.00517.21
7.1.90.0080.00315.89
7.1.80.0060.01015.88
7.1.70.0070.00416.48
7.1.60.0070.01217.52
7.1.50.0030.00716.06
7.1.40.0000.01215.99
7.1.30.0100.00315.96
7.1.20.0000.01615.81
7.1.10.0070.00415.65
7.1.00.0050.03819.11
7.0.330.0030.00815.57
7.0.320.0130.00315.46
7.0.310.0080.00415.53
7.0.300.0030.00715.67
7.0.290.0030.01015.25
7.0.280.0030.00715.43
7.0.270.0000.00915.33
7.0.260.0030.00715.50
7.0.250.0060.00315.69
7.0.240.0000.01015.59
7.0.230.0070.00315.41
7.0.220.0030.00615.48
7.0.210.0110.00315.49
7.0.200.0050.00716.21
7.0.190.0040.00415.19
7.0.180.0070.00315.25
7.0.170.0000.01315.72
7.0.160.0030.00615.47
7.0.150.0000.01415.38
7.0.140.0030.00715.67
7.0.130.0080.00415.62
7.0.120.0070.00715.64
7.0.110.0060.00315.48
7.0.100.0000.01015.67
7.0.90.0060.00615.59
7.0.80.0100.00015.63
7.0.70.0060.00315.56
7.0.60.0050.04018.64
7.0.50.0100.03518.04
7.0.40.0100.03416.96
7.0.30.0140.03416.95
7.0.20.0130.03116.98
7.0.10.0150.03216.98
7.0.00.0140.03516.76
5.6.380.0040.00914.59
5.6.370.0000.01314.43
5.6.360.0040.00714.39
5.6.350.0040.00714.44
5.6.340.0000.00914.12
5.6.330.0110.00014.72
5.6.320.0030.00814.29
5.6.310.0070.00714.43
5.6.300.0040.00714.67
5.6.290.0100.00314.30
5.6.280.0020.04017.56
5.6.270.0030.00814.53
5.6.260.0060.00614.45
5.6.250.0030.00714.47
5.6.240.0030.00614.66
5.6.230.0070.00714.43
5.6.220.0000.01614.26
5.6.210.0060.02317.42
5.6.200.0110.03317.76
5.6.190.0060.03917.75
5.6.180.0110.03117.78
5.6.170.0120.03517.72
5.6.160.0220.02717.81
5.6.150.0150.03717.90
5.6.140.0090.02917.85
5.6.130.0130.03417.75
5.6.120.0060.03617.68
5.6.110.0150.03217.64
5.6.100.0130.03517.77
5.6.90.0100.03817.73
5.6.80.0080.03417.40
5.6.70.0190.02717.49
5.6.60.0230.02317.37
5.6.50.0280.01717.40
5.6.40.0030.03617.38
5.6.30.0110.02817.42
5.6.20.0160.02817.52
5.6.10.0150.03017.44
5.6.00.0170.02717.30
5.5.380.0050.00511.36
5.5.370.0000.01011.18
5.5.360.0000.01011.43
5.5.350.0050.04315.80
5.5.340.0130.02716.19
5.5.330.0150.02516.18
5.5.320.0080.03116.04
5.5.310.0110.03316.01
5.5.300.0070.03516.08
5.5.290.0030.03616.13
5.5.280.0100.03016.04
5.5.270.0080.03216.09
5.5.260.0170.02816.22
5.5.250.0080.03116.05
5.5.240.0150.02815.76
5.5.230.0170.02715.72
5.5.220.0190.02815.79
5.5.210.0110.03115.74
5.5.200.0170.02715.71
5.5.190.0080.03815.68
5.5.180.0150.02715.71
5.5.170.0030.00711.38
5.5.160.0220.02115.65
5.5.150.0120.03115.78
5.5.140.0130.02815.72
5.5.130.0150.02515.88
5.5.120.0180.02115.78
5.5.110.0150.02715.80
5.5.100.0170.02215.77
5.5.90.0120.02715.72
5.5.80.0120.03215.57
5.5.70.0080.03215.68
5.5.60.0130.02715.85
5.5.50.0130.03015.62
5.5.40.0220.02215.59
5.5.30.0100.02915.78
5.5.20.0130.02915.58
5.5.10.0150.03115.74
5.5.00.0130.02715.73

preferences:
52.64 ms | 401 KiB | 5 Q