3v4l.org

run code in 300+ PHP versions simultaneously
<?php $openTimeslots = ['02-09-2021' => [ '8:00-10:00', '16:00-19:00'], '03-09-2021' => [ '7:00-10:00', '16:15-19:00', '14:00-16:00', '13:00-14:15'], '04-09-2021' => [ '7:15-10:00', '15:15-18:15']]; $common = array_map(fn($timeRange) => explode('-', $timeRange), array_shift($openTimeslots)); foreach ($openTimeslots as $slots) { foreach ($slots as $slot) { [$start, $end] = explode('-', $slot); foreach ($common as [&$commonStart, &$commonEnd]) { if ($start >= $commonStart && $start < $commonEnd) { $commonStart = $start; } if ($end > $commonStart && $end <= $commonEnd) { $commonEnd = $end; } } } } var_export( array_map( fn($subarray) => implode('-', $subarray), $common ) );

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.4.130.0160.00519.53
8.4.120.0100.01021.96
8.4.110.0100.01118.64
8.4.100.0140.00618.88
8.4.90.0110.00918.89
8.4.80.0130.00817.74
8.4.70.0050.00317.83
8.4.60.0070.00418.54
8.4.50.0130.00817.77
8.4.40.0060.01017.78
8.4.30.0120.00320.50
8.4.20.0070.01324.25
8.4.10.0170.00317.61
8.3.260.0060.00416.76
8.3.250.0100.00917.08
8.3.240.0050.00316.70
8.3.230.0150.00416.48
8.3.220.0130.00717.18
8.3.210.0100.00516.54
8.3.200.0060.00216.65
8.3.190.0120.00716.80
8.3.180.0060.00318.55
8.3.170.0130.00616.61
8.3.160.0070.01416.29
8.3.150.0140.00417.18
8.3.140.0040.00419.00
8.3.130.0030.00616.55
8.3.120.0030.00618.71
8.3.110.0000.00818.31
8.3.100.0080.00424.06
8.3.90.0090.00026.77
8.3.80.0030.00616.50
8.3.70.0080.00816.58
8.3.60.0180.00016.86
8.3.50.0100.01018.09
8.3.40.0070.00720.95
8.3.30.0140.00018.72
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.290.0130.00620.25
8.2.280.0050.00320.10
8.2.270.0090.00916.67
8.2.260.0130.00618.33
8.2.250.0120.00618.47
8.2.240.0000.00917.14
8.2.230.0090.00620.94
8.2.220.0070.00737.54
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0140.00716.75
8.2.180.0110.00725.92
8.2.170.0100.01019.14
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00820.80
8.2.110.0150.00320.98
8.2.100.0030.00917.72
8.2.90.0040.00419.34
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0090.00019.78
8.2.30.0040.00418.20
8.2.20.0040.00418.14
8.2.10.0040.00419.28
8.2.00.0040.00419.32
8.1.330.0100.00922.12
8.1.320.0110.00716.31
8.1.310.0160.00318.17
8.1.300.0110.00716.70
8.1.290.0060.00330.84
8.1.280.0140.00025.92
8.1.270.0150.00323.99
8.1.260.0000.00926.35
8.1.250.0150.00028.09
8.1.240.0090.00023.82
8.1.230.0040.00822.75
8.1.220.0040.00417.77
8.1.210.0080.00018.77
8.1.200.0000.00917.48
8.1.190.0060.00317.38
8.1.180.0000.00818.10
8.1.170.0080.00018.74
8.1.160.0000.00718.94
8.1.150.0040.00418.59
8.1.140.0060.00317.44
8.1.130.0000.00717.50
8.1.120.0030.00618.84
8.1.110.0090.00318.28
8.1.100.0110.00318.03
8.1.90.0100.00318.01
8.1.80.0090.00518.00
8.1.70.0110.00318.06
8.1.60.0110.00518.10
8.1.50.0090.00818.14
8.1.40.0110.00518.13
8.1.30.0100.00518.18
8.1.20.0090.00618.10
8.1.10.0090.00718.15
8.1.00.0100.00518.10
8.0.300.0040.00419.85
8.0.290.0070.00316.63
8.0.280.0070.00018.36
8.0.270.0000.00816.82
8.0.260.0070.00016.81
8.0.250.0030.00618.25
8.0.240.0060.00617.63
8.0.230.0100.00417.41
8.0.220.0080.00517.43
8.0.210.0080.00517.41
8.0.200.0090.00517.45
8.0.190.0100.00317.38
8.0.180.0080.00517.41
8.0.170.0120.00217.48
8.0.160.0090.00417.38
8.0.150.0070.00617.33
8.0.140.0110.00317.21
8.0.130.0090.00416.42
8.0.120.0060.00817.21
8.0.110.0080.00417.20
8.0.100.0080.00517.33
8.0.90.0060.00717.32
8.0.80.0100.00417.41
8.0.70.0100.00317.36
8.0.60.0080.00617.30
8.0.50.0110.00317.39
8.0.30.0110.00217.35
8.0.20.0090.00417.35
8.0.10.0080.00517.36
8.0.00.0090.00117.57
7.4.330.0070.00114.74
7.4.320.0090.00417.30
7.4.300.0070.00417.09
7.4.290.0060.00616.90
7.4.280.0070.00617.01
7.4.270.0080.00516.93
7.4.260.0090.00416.23
7.4.250.0080.00417.01
7.4.240.0040.00716.97
7.4.230.0080.00317.01
7.4.220.0070.00416.84
7.4.210.0070.00316.94
7.4.200.0050.00417.02
7.4.190.0080.00317.06
7.4.180.0040.00616.98
7.4.160.0060.00416.94
7.4.150.0080.00216.95
7.4.140.0070.00316.72
7.4.130.0070.00217.44
7.4.120.0080.00317.42
7.4.110.0040.00717.37
7.4.100.0080.00217.37
7.4.90.0050.00517.42
7.4.80.0070.00417.35
7.4.70.0060.00517.28
7.4.60.0060.00517.43
7.4.50.0070.00417.20
7.4.40.0080.00216.82
7.4.30.0040.00616.85
7.4.20.0060.00416.86
7.4.10.0050.00616.95
7.4.00.0060.00516.83
7.3.330.0070.00616.65
7.3.320.0100.00216.04
7.3.310.0090.00416.73
7.3.300.0070.00616.70
7.3.290.0100.00216.72
7.3.280.0100.00316.64
7.3.270.0060.00616.68
7.3.260.0080.00516.67
7.3.250.0090.00416.79
7.3.240.0110.00216.68
7.3.230.0110.00216.66
7.3.220.0070.00516.63
7.3.210.0080.00516.65
7.3.200.0080.00516.57
7.3.190.0080.00516.60
7.3.180.0090.00416.66
7.3.170.0080.00516.62
7.3.160.0080.00416.63
7.3.150.0120.00116.61
7.3.140.0070.00616.65
7.3.130.0080.00416.59
7.3.120.0080.00416.63
7.3.110.0090.00416.54
7.3.100.0080.00416.57
7.3.90.0080.00516.93
7.3.80.0090.00416.65
7.3.70.0080.00416.70
7.3.60.0080.00516.80
7.3.50.0080.00416.73
7.3.40.0090.00316.69
7.3.30.0060.00616.71
7.3.20.0090.00418.17
7.3.10.0120.00118.11
7.3.00.0090.00418.05

preferences:
101.13 ms | 403 KiB | 5 Q