3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 1 => [ "opens_at" => "10:00", "closes_at" => "18:00" ], 2 => [ "opens_at" => "10:00", "closes_at" => "18:00" ], 3 => [ "opens_at" => "10:00", "closes_at" => "18:00" ], 4 => [ "opens_at" => "14:00", "closes_at" => "17:00" ], 5 => [ "opens_at" => "14:00", "closes_at" => "17:00" ], 6 => [ "opens_at" => "18:00", "closes_at" => "19:00" ] ]; $groups = []; foreach($a as $dayNumber => $w){ if(!array_key_exists($w['opens_at'] . '-' . $w['closes_at'], $groups)){ $groups[$w['opens_at'] . '-' . $w['closes_at']] = []; } $groups[$w['opens_at'] . '-' . $w['closes_at']][] = $dayNumber; } $res = array_map(function($v){ return implode(', ', $v); }, $groups); var_dump(array_flip($res));

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.5.10.0080.00816.75
8.5.00.0130.00920.00
8.4.150.0020.00114.05
8.4.140.0130.00819.22
8.4.130.0120.00918.64
8.4.120.0120.00723.99
8.4.110.0140.00718.78
8.4.100.0140.00618.52
8.4.90.0110.00918.95
8.4.80.0060.00220.42
8.4.70.0130.00718.89
8.4.60.0130.00718.86
8.4.50.0110.00920.34
8.4.40.0030.00619.51
8.4.30.0130.00320.61
8.4.20.0030.01718.66
8.4.10.0190.00319.50
8.3.280.0130.00918.63
8.3.270.0160.01116.72
8.3.260.0030.00616.54
8.3.250.0080.01118.82
8.3.240.0070.00616.94
8.3.230.0060.00216.64
8.3.220.0080.01019.19
8.3.210.0140.00516.50
8.3.200.0030.00516.77
8.3.190.0050.00517.06
8.3.180.0110.00718.88
8.3.170.0120.00620.61
8.3.160.0040.00817.20
8.3.150.0110.00717.05
8.3.140.0040.00416.77
8.3.130.0070.00718.39
8.3.120.0030.00518.84
8.3.110.0000.00920.94
8.3.100.0050.00318.58
8.3.90.0070.01426.77
8.3.80.0000.01116.63
8.3.70.0060.00916.75
8.3.60.0110.01118.30
8.3.50.0150.00718.28
8.3.40.0140.00718.98
8.3.30.0120.00618.73
8.3.20.0060.00321.68
8.3.10.0040.00421.03
8.3.00.0130.00321.79
8.2.290.0070.00820.27
8.2.280.0080.01118.45
8.2.270.0120.00916.96
8.2.260.0000.00819.25
8.2.250.0030.00516.70
8.2.240.0090.00618.92
8.2.230.0040.00422.58
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0030.00616.50
8.2.190.0140.00416.63
8.2.180.0190.00325.92
8.2.170.0070.00722.96
8.2.160.0090.00621.74
8.2.150.0040.00425.66
8.2.140.0030.00724.66
8.2.130.0030.00626.16
8.2.120.0000.00821.00
8.2.110.0040.00422.07
8.2.100.0090.00317.91
8.2.90.0030.00517.75
8.2.80.0040.00418.70
8.2.70.0050.00317.50
8.2.60.0080.00018.05
8.2.50.0090.00018.07
8.2.40.0060.00318.34
8.2.30.0050.00318.01
8.2.20.0000.00718.02
8.2.10.0050.00319.03
8.2.00.0070.00018.18
8.1.330.0110.00822.02
8.1.320.0140.00716.10
8.1.310.0150.00018.34
8.1.300.0090.00019.80
8.1.290.0030.01930.84
8.1.280.0090.00625.92
8.1.270.0030.00620.93
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00320.61
8.1.230.0030.00717.70
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0050.00318.75
8.1.170.0040.00420.14
8.1.160.0030.00618.86
8.1.150.0040.00418.97
8.1.140.0000.00720.28
8.1.130.0040.00420.28
8.1.120.0040.00417.49
8.1.110.0000.01017.34
8.1.100.0040.00417.41
8.1.90.0000.00817.40
8.1.80.0000.00817.39
8.1.70.0040.00417.46
8.1.60.0000.00817.52
8.1.50.0060.00317.57
8.1.40.0000.00917.53
8.1.30.0040.00417.66
8.1.20.0080.00017.50
8.1.10.0060.00317.54
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0020.00516.75
8.0.280.0080.00018.48
8.0.270.0000.00717.25
8.0.260.0070.00018.53
8.0.250.0040.00416.90
8.0.240.0030.00516.87
8.0.230.0000.00816.93
8.0.220.0000.00716.88
8.0.210.0000.00816.87
8.0.200.0040.00416.93
8.0.190.0040.00417.00
8.0.180.0070.00016.83
8.0.170.0090.00016.94
8.0.160.0000.00716.93
8.0.150.0000.00716.93
8.0.140.0000.00716.91
8.0.130.0030.00313.28
8.0.120.0030.00516.91
8.0.110.0020.00516.75
8.0.100.0000.00716.83
8.0.90.0000.00716.86
8.0.80.0090.00516.83
8.0.70.0000.00816.98
8.0.60.0070.00016.94
8.0.50.0070.00016.79
8.0.30.0110.00816.84
8.0.20.0130.00817.13
8.0.10.0060.00317.00
8.0.00.0090.00816.86
7.4.330.0030.00215.55
7.4.320.0000.00616.64
7.4.300.0000.00716.63
7.4.290.0000.00916.45
7.4.280.0000.00816.63
7.4.270.0090.00016.54
7.4.260.0070.00016.57
7.4.250.0000.00716.63
7.4.240.0040.00416.53
7.4.230.0050.00316.58
7.4.220.0000.00716.51
7.4.210.0090.00716.59
7.4.200.0000.00716.44
7.4.160.0060.01116.64
7.4.140.0120.00617.86
7.4.130.0180.00016.59
7.4.120.0080.00816.65
7.4.110.0110.00616.48
7.4.100.0150.00316.49
7.4.90.0110.00716.46
7.4.80.0100.00719.39
7.4.70.0100.01016.76
7.4.60.0130.00316.60
7.4.50.0110.00716.57
7.4.40.0080.00816.41
7.4.10.0090.00615.00
7.4.00.0030.01414.84
7.3.330.0000.00513.32
7.3.320.0030.00313.17
7.3.310.0070.00016.29
7.3.300.0030.00316.26
7.3.290.0090.00916.39
7.3.280.0090.00616.40
7.3.260.0080.01216.57
7.3.240.0110.00716.42
7.3.230.0170.00016.40
7.3.210.0070.01016.36
7.3.200.0100.00716.67
7.3.190.0040.01416.61
7.3.180.0070.01016.30
7.3.170.0040.01216.56
7.3.160.0070.01016.55
7.3.130.0060.01014.77
7.3.120.0110.00814.87
7.3.110.0080.01114.81
7.3.100.0110.00314.78
7.3.90.0020.01414.91
7.3.80.0100.00515.00
7.3.70.0070.00314.85
7.3.60.0070.00714.76
7.3.50.0070.00714.68
7.3.40.0040.00814.68
7.3.30.0030.00814.63
7.3.20.0050.01016.63
7.3.10.0070.00716.53
7.3.00.0110.00716.54
7.2.330.0100.00916.77
7.2.320.0090.00916.35
7.2.310.0130.00816.59
7.2.300.0000.01616.55
7.2.290.0080.01016.82
7.2.260.0000.01915.20
7.2.250.0050.01115.27
7.2.240.0070.01015.12
7.2.230.0050.01115.26
7.2.220.0060.00614.84
7.2.210.0040.00815.18
7.2.200.0080.00515.00
7.2.190.0060.01115.18
7.2.180.0070.00414.89
7.2.170.0070.00615.12
7.2.160.0040.01215.10
7.2.150.0060.00916.92
7.2.140.0060.00916.86
7.2.130.0110.00616.83
7.2.120.0030.00916.90
7.2.110.0060.00917.01
7.2.100.0070.00816.92
7.2.90.0060.00716.93
7.2.80.0080.00917.01
7.2.70.0110.00316.85
7.2.60.0120.00716.94
7.2.50.0090.00616.96
7.2.40.0080.00717.00
7.2.30.0050.01017.04
7.2.20.0100.00517.01
7.2.10.0080.00816.96
7.2.00.0090.00216.88
7.1.330.0090.00615.77
7.1.320.0080.00315.89
7.1.310.0050.00915.85
7.1.300.0060.00615.77
7.1.290.0020.01115.77
7.1.280.0040.01015.65
7.1.270.0070.00615.78
7.1.260.0080.00615.76
7.1.250.0040.00515.70
7.1.240.0040.00815.56
7.1.230.0030.01015.63
7.1.220.0030.00915.88
7.1.210.0070.00715.86
7.1.200.0060.01015.93
7.1.190.0040.00415.77
7.1.180.0030.00615.98
7.1.170.0110.00015.89
7.1.160.0000.01415.61
7.1.150.0060.00615.84
7.1.140.0070.00715.76
7.1.130.0030.01015.79
7.1.120.0040.00415.82
7.1.110.0060.00915.50
7.1.100.0070.00715.80
7.1.90.0060.01015.81
7.1.80.0000.01215.61
7.1.70.0000.01515.87
7.1.60.0040.01116.00
7.1.50.0060.00615.79
7.1.40.0000.01115.63
7.1.30.0100.00315.83
7.1.20.0060.00615.76
7.1.10.0040.00715.76
7.1.00.0060.00915.93

preferences:
41.13 ms | 403 KiB | 5 Q