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, ), 5 => array( 'label' => '100-600', 'value' => '100_600', 'count' => 1, ), ) ); $counts = array_sum(array_column($prices['options'], 'count')); $values = []; foreach ($prices['options'] as $priceOption) { [$values[], $values[]] = explode('_', $priceOption['value']); } $lower = min($values); $upper = max($values); $prices['options'] = [ 'label' => $lower . '-' . $upper, 'value' => $lower . '_' . $upper, '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.60.0120.00718.68
8.5.50.0070.01016.88
8.5.30.0100.00617.29
8.5.20.0110.01119.40
8.5.10.0090.00816.53
8.5.00.0100.01220.04
8.4.210.0100.00721.45
8.4.180.0130.01019.77
8.4.170.0130.00823.95
8.4.160.0160.00523.23
8.4.150.0080.00416.90
8.4.140.0120.01117.37
8.4.130.0110.00917.44
8.4.120.0150.00520.42
8.4.110.0150.00618.74
8.4.100.0080.01217.70
8.4.90.0080.00224.38
8.4.80.0150.00918.70
8.4.70.0100.00918.06
8.4.60.0120.00818.87
8.4.50.0060.00418.63
8.4.40.0160.00317.97
8.4.30.0140.00420.51
8.4.20.0160.00319.49
8.4.10.0130.00317.54
8.3.300.0080.01220.73
8.3.290.0120.00918.49
8.3.280.0090.01218.48
8.3.270.0110.00816.80
8.3.260.0120.00716.91
8.3.250.0130.00618.84
8.3.240.0130.00616.54
8.3.230.0110.00616.69
8.3.220.0060.00218.87
8.3.210.0040.00416.57
8.3.200.0050.00416.79
8.3.190.0090.00917.04
8.3.180.0110.00517.20
8.3.170.0110.00720.83
8.3.160.0040.00417.13
8.3.150.0070.01017.19
8.3.140.0050.00318.46
8.3.130.0110.00018.69
8.3.120.0040.00420.55
8.3.110.0150.00616.76
8.3.100.0000.00816.45
8.3.90.0040.00426.77
8.3.80.0070.00316.88
8.3.70.0200.00716.75
8.3.60.0030.01216.50
8.3.50.0110.01118.27
8.3.40.0040.01119.52
8.3.30.0090.00618.89
8.3.20.0020.00524.18
8.3.10.0080.00024.66
8.3.00.0060.00326.16
8.2.300.0140.00518.82
8.2.290.0050.00419.17
8.2.280.0110.00718.61
8.2.270.0070.01116.97
8.2.260.0040.00416.52
8.2.250.0090.00018.66
8.2.240.0030.01317.05
8.2.230.0040.00420.94
8.2.220.0090.00024.06
8.2.210.0110.00726.77
8.2.200.0080.00416.50
8.2.190.0110.01116.75
8.2.180.0070.00725.92
8.2.170.0100.00719.14
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0040.00419.23
8.2.110.0040.00422.14
8.2.100.0090.00319.50
8.2.90.0060.00317.63
8.2.80.0050.00318.91
8.2.70.0050.00317.75
8.2.60.0030.00517.80
8.2.50.0050.00318.07
8.2.40.0080.00018.22
8.2.30.0050.00218.11
8.2.20.0040.00418.19
8.2.10.0050.00319.01
8.2.00.0030.00319.30
8.1.340.0110.00821.68
8.1.330.0090.01118.17
8.1.320.0110.01016.30
8.1.310.0110.00718.42
8.1.300.0070.01020.27
8.1.290.0110.00430.84
8.1.280.0070.00725.92
8.1.270.0030.00623.99
8.1.260.0090.00026.35
8.1.250.0030.00528.09
8.1.240.0100.00020.77
8.1.230.0110.00017.77
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0070.00317.23
8.1.180.0060.00318.10
8.1.170.0000.00818.66
8.1.160.0000.00718.95
8.1.150.0000.00818.64
8.1.140.0040.00417.41
8.1.130.0070.00018.93
8.1.120.0050.00217.31
8.1.110.0040.00417.45
8.1.100.0000.00717.51
8.1.90.0070.00017.47
8.1.80.0030.00617.51
8.1.70.0000.00717.22
8.1.60.0050.00317.61
8.1.50.0080.00017.54
8.1.40.0040.00417.51
8.1.30.0000.00817.55
8.1.20.0040.00417.56
8.1.10.0000.00717.45
8.1.00.0050.00317.53
8.0.300.0000.00918.77
8.0.290.0000.00916.63
8.0.280.0000.00718.34
8.0.270.0000.00716.74
8.0.260.0050.00318.33
8.0.250.0000.00716.88
8.0.240.0000.00716.94
8.0.230.0000.00816.97
8.0.220.0000.00716.91
8.0.210.0050.00216.88
8.0.200.0000.00817.00
8.0.190.0040.00417.02
8.0.180.0070.00016.93
8.0.170.0060.00316.84
8.0.160.0040.00416.90
8.0.150.0000.00816.84
8.0.140.0040.00416.85
8.0.130.0000.00613.29
8.0.120.0040.00416.86
8.0.110.0030.00616.54
8.0.100.0070.00216.77
8.0.90.0060.00316.73
8.0.80.0010.00716.88
8.0.70.0020.00616.84
8.0.60.0050.00416.84
8.0.50.0040.00416.88
8.0.30.0040.00316.95
8.0.20.0040.00516.98
8.0.10.0020.00616.87
8.0.00.0020.00617.03
7.4.330.0030.00315.55
7.4.320.0030.00316.53
7.4.300.0070.00016.51
7.4.290.0040.00416.48
7.4.280.0030.00616.59
7.4.270.0050.00316.46
7.4.260.0000.00513.23
7.4.250.0000.00716.48
7.4.240.0020.00516.66
7.4.230.0050.00216.56
7.4.220.0040.00416.60
7.4.210.0020.00516.56
7.4.200.0050.00216.69
7.4.190.0030.00316.63
7.4.180.0030.00316.55
7.4.160.0050.00216.71
7.4.150.0020.00516.36
7.4.140.0050.00316.39
7.4.130.0020.00516.46
7.4.120.0030.00316.36
7.4.110.0050.00216.42
7.4.100.0070.00016.47
7.4.90.0030.00316.54
7.4.80.0040.00416.52
7.4.70.0030.00316.37
7.4.60.0030.00316.52
7.4.50.0050.00216.35
7.4.40.0020.00516.51
7.4.30.0020.00516.51
7.4.20.0050.00216.28
7.4.10.0060.00116.43
7.4.00.0040.00416.42
7.3.330.0030.00616.13
7.3.320.0020.00213.06
7.3.310.0050.00316.21
7.3.300.0040.00416.22
7.3.290.0020.00616.15
7.3.280.0040.00416.32
7.3.270.0020.00616.27
7.3.260.0050.00216.23
7.3.250.0000.00716.25
7.3.240.0030.00416.29
7.3.230.0070.00216.25
7.3.220.0050.00216.14
7.3.210.0030.00316.14
7.3.200.0000.00716.17
7.3.190.0050.00316.19
7.3.180.0000.00716.22
7.3.170.0050.00216.19
7.3.160.0020.00616.21
7.3.150.0030.00316.28
7.3.140.0060.00416.21
7.3.130.0040.00416.29
7.3.120.0030.00516.22
7.3.110.0050.00216.14
7.3.100.0020.00516.17
7.3.90.0000.00716.54
7.3.80.0050.00216.20
7.3.70.0050.00216.35
7.3.60.0040.00416.44
7.3.50.0070.00016.42
7.3.40.0030.00316.46
7.3.30.0010.00516.43
7.3.20.0030.00318.32
7.3.10.0030.00318.19
7.3.00.0050.00318.11
7.2.340.0040.00416.43
7.0.330.0060.00216.74
5.6.400.0030.00615.51

preferences:
45.95 ms | 1412 KiB | 5 Q