3v4l.org

run code in 500+ PHP versions simultaneously
<?php $prices = array( 'label' => 'Price', 'count' => 5, 'attribute_code' => 'price', 'options' => array( 0 => array( 'label' => '0-100', 'value' => '0_100', 'count' => 2208, ), 1 => array( 'label' => '100-200', 'value' => '100_200', 'count' => 338, ), 2 => array( 'label' => '200-300', 'value' => '200_300', 'count' => 16, ), 3 => array( 'label' => '300-400', 'value' => '300_400', 'count' => 1, ), 4 => array( 'label' => '400-500', 'value' => '400_500', 'count' => 1, ), ) ); $counts = array_sum(array_column($prices['options'], 'count')); $values = array_column($prices['options'], 'value'); array_multisort($values, SORT_ASC, SORT_NATURAL); $lowest = explode('_', reset($values))[0] ?? ''; $highest = explode('_', end($values))[1] ?? ''; $prices['options'] = [ 'label' => $lowest . '-' . $highest, 'value' => $lowest . '_' . $highest, 'count' => $counts ]; var_export($prices['options']);

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.70.0090.00816.81
8.5.60.0100.00716.65
8.5.50.0100.00716.79
8.5.30.0120.00617.59
8.5.20.0100.00819.36
8.5.10.0110.00416.67
8.5.00.0150.00620.07
8.4.210.0140.00819.63
8.4.180.0130.01219.78
8.4.170.0130.00923.92
8.4.160.0110.01023.88
8.4.150.0080.00516.91
8.4.140.0120.00817.52
8.4.130.0100.00917.68
8.4.120.0100.00620.91
8.4.110.0090.01118.77
8.4.100.0130.00817.66
8.4.90.0040.00522.33
8.4.80.0110.00918.85
8.4.70.0030.00517.67
8.4.60.0110.00918.56
8.4.50.0130.00717.78
8.4.40.0050.00317.50
8.4.30.0100.00920.67
8.4.20.0030.00619.57
8.4.10.0090.00017.64
8.3.300.0110.00920.61
8.3.290.0140.00720.85
8.3.280.0080.00617.04
8.3.270.0140.00616.48
8.3.260.0120.00516.75
8.3.250.0120.00518.83
8.3.240.0120.00616.61
8.3.230.0090.01016.54
8.3.220.0080.00818.95
8.3.210.0110.00916.62
8.3.200.0060.01216.88
8.3.190.0110.00816.45
8.3.180.0050.00416.87
8.3.170.0090.00916.86
8.3.160.0130.00619.90
8.3.150.0130.00616.61
8.3.140.0120.00617.40
8.3.130.0090.00018.29
8.3.120.0000.01019.00
8.3.110.0070.01120.94
8.3.100.0080.00024.06
8.3.90.0150.00426.77
8.3.80.0040.00416.50
8.3.70.0110.00716.75
8.3.60.0110.00416.37
8.3.50.0030.01720.09
8.3.40.0110.00719.11
8.3.30.0150.00018.54
8.3.20.0050.00224.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.300.0120.00818.90
8.2.290.0120.00918.90
8.2.280.0050.00320.04
8.2.270.0070.01117.29
8.2.260.0070.01118.31
8.2.250.0120.00918.28
8.2.240.0130.00318.41
8.2.230.0070.00022.58
8.2.220.0040.00437.54
8.2.210.0080.00626.77
8.2.200.0030.00616.50
8.2.190.0180.00316.63
8.2.180.0030.01325.92
8.2.170.0060.01318.91
8.2.160.0060.00922.96
8.2.150.0000.00725.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0070.00021.03
8.2.110.0070.00321.18
8.2.100.0110.00017.84
8.2.90.0030.00619.57
8.2.80.0070.00019.21
8.2.70.0080.00317.60
8.2.60.0040.00417.91
8.2.50.0040.00818.07
8.2.40.0000.00819.88
8.2.30.0040.00417.74
8.2.20.0050.00318.18
8.2.10.0060.00318.73
8.2.00.0000.00719.31
8.1.340.0120.01021.61
8.1.330.0130.00718.50
8.1.320.0110.00818.47
8.1.310.0070.01018.55
8.1.300.0080.00017.88
8.1.290.0030.00618.88
8.1.280.0040.01425.92
8.1.270.0000.00723.99
8.1.260.0090.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00022.59
8.1.230.0110.00020.86
8.1.220.0040.00417.79
8.1.210.0060.00318.79
8.1.200.0000.00817.35
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0030.00618.75
8.1.160.0040.00418.80
8.1.150.0000.00918.53
8.1.140.0050.00317.46
8.1.130.0030.00318.77
8.1.120.0000.00817.47
8.1.110.0040.00417.48
8.1.100.0040.00417.45
8.1.90.0070.00017.38
8.1.80.0080.00017.46
8.1.70.0000.00717.45
8.1.60.0000.00817.62
8.1.50.0000.00817.55
8.1.40.0000.00717.55
8.1.30.0050.00317.60
8.1.20.0040.00417.63
8.1.10.0040.00417.47
8.1.00.0040.00417.50
8.0.300.0040.00419.89
8.0.290.0070.00016.75
8.0.280.0030.00318.44
8.0.270.0040.00416.76
8.0.260.0040.00418.32
8.0.250.0070.00016.97
8.0.240.0000.00716.84
8.0.230.0030.00316.91
8.0.220.0020.00516.87
8.0.210.0030.00316.86
8.0.200.0000.00716.89
8.0.190.0060.00316.97
8.0.180.0020.00516.96
8.0.170.0000.00916.77
8.0.160.0000.00816.84
8.0.150.0000.00716.86
8.0.140.0040.00316.74
8.0.130.0000.00513.25
8.0.120.0080.00016.88
8.0.110.0040.00416.89
8.0.100.0000.00816.91
8.0.90.0040.00416.92
8.0.80.0000.00716.72
8.0.70.0040.00416.89
8.0.60.0000.00716.89
8.0.50.0000.00716.69
8.0.30.0040.00416.89
8.0.20.0050.00216.77
8.0.10.0000.00817.06
8.0.00.0000.00716.99
7.4.330.0000.00515.55
7.4.320.0000.00716.54
7.4.300.0040.00416.63
7.4.290.0030.00316.52
7.4.280.0040.00416.53
7.4.270.0040.00416.65
7.4.260.0000.00513.39
7.4.250.0030.00316.48
7.4.240.0040.00416.50
7.4.230.0050.00316.54
7.4.220.0000.00816.34
7.4.210.0070.00016.45
7.4.200.0000.00716.61
7.4.190.0030.00316.62
7.4.180.0050.00316.62
7.4.160.0000.00816.55
7.4.150.0050.00216.44
7.4.140.0060.00016.36
7.4.130.0030.00316.23
7.4.120.0040.00416.44
7.4.110.0000.00716.62
7.4.100.0000.00716.60
7.4.90.0030.00316.49
7.4.80.0000.00716.36
7.4.70.0040.00416.64
7.4.60.0060.00016.21
7.4.50.0070.00016.30
7.4.40.0000.00716.45
7.4.30.0000.00716.41
7.4.20.0030.00316.47
7.4.10.0040.00416.49
7.4.00.0000.00716.62
7.3.330.0040.00416.15
7.3.320.0000.00613.17
7.3.310.0070.00016.23
7.3.300.0070.00016.22
7.3.290.0070.00016.23
7.3.280.0000.00716.32
7.3.270.0020.00516.32
7.3.260.0070.00016.23
7.3.250.0030.00316.34
7.3.240.0020.00516.36
7.3.230.0040.00416.31
7.3.220.0000.00616.27
7.3.210.0030.00316.27
7.3.200.0020.00516.27
7.3.190.0080.00016.30
7.3.180.0070.00016.29
7.3.170.0080.00016.24
7.3.160.0050.00216.30
7.3.150.0040.00416.29
7.3.140.0070.00016.26
7.3.130.0030.00316.27
7.3.120.0000.00716.30
7.3.110.0000.00616.18
7.3.100.0030.00316.16
7.3.90.0060.00016.43
7.3.80.0000.00616.17
7.3.70.0040.00416.28
7.3.60.0070.00016.34
7.3.50.0060.00016.34
7.3.40.0030.00316.33
7.3.30.0030.00316.35
7.3.20.0000.00718.30
7.3.10.0040.00418.18
7.3.00.0060.00318.21

preferences:
59.37 ms | 1404 KiB | 5 Q