3v4l.org

run code in 300+ PHP versions simultaneously
<?php $categories = array( 'category_1' => array( 'name' => 'Category 1', 'column' => '1' ), 'category_2' => array( 'name' => 'Category 2', 'column' => '2' ), 'category_3' => array( 'name' => 'Category 2', 'column' => '1' ), 'category_4' => array( 'name' => 'Category 4', 'column' => '3' ), 'category_4' => array( 'name' => 'Category 4', 'column' => '2' ), ); $output = array(); foreach($categories as $catName => $category) { $columnNum = $category['column']; $key = 'column_' . $columnNum; if (!isset($output[$columnNum] )) { $output[$key] = array($catName); } else { $output[$key][] = $catName; } } var_dump($output);

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.70.0130.00318.68
8.3.60.0040.01116.62
8.3.50.0070.01321.87
8.3.40.0150.00618.76
8.3.30.0130.00719.08
8.3.20.0050.00320.16
8.3.10.0040.00423.57
8.3.00.0080.00018.96
8.2.180.0130.00318.27
8.2.170.0140.00322.96
8.2.160.0120.00320.52
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00020.68
8.2.110.0030.00622.20
8.2.100.0060.00619.57
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0050.00517.63
8.2.60.0090.00018.05
8.2.50.0080.00018.07
8.2.40.0000.00920.07
8.2.30.0000.00818.39
8.2.20.0040.00419.41
8.2.10.0070.00018.19
8.2.00.0040.00417.71
8.1.280.0030.01025.92
8.1.270.0080.00023.74
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00422.18
8.1.230.0040.00719.22
8.1.220.0050.00217.75
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0030.00618.43
8.1.160.0000.00722.02
8.1.150.0030.00718.55
8.1.140.0070.00017.33
8.1.130.0030.00517.88
8.1.120.0000.00717.49
8.1.110.0000.00717.50
8.1.100.0050.00317.52
8.1.90.0040.00417.38
8.1.80.0050.00317.36
8.1.70.0030.00317.38
8.1.60.0030.00617.52
8.1.50.0000.00817.48
8.1.40.0100.00317.53
8.1.30.0060.00317.58
8.1.20.0060.00317.49
8.1.10.0040.00417.54
8.1.00.0000.00817.45
8.0.300.0020.00518.77
8.0.290.0070.00017.04
8.0.280.0030.00318.46
8.0.270.0000.00817.18
8.0.260.0030.00318.39
8.0.250.0030.00316.86
8.0.240.0030.00316.93
8.0.230.0030.00316.96
8.0.220.0000.00716.80
8.0.210.0070.00016.94
8.0.200.0030.00316.88
8.0.190.0000.00716.92
8.0.180.0040.00416.87
8.0.170.0080.00016.80
8.0.160.0030.00317.02
8.0.150.0030.00516.82
8.0.140.0030.00716.86
8.0.130.0000.00513.32
8.0.120.0040.00416.88
8.0.110.0040.00416.82
8.0.100.0040.00416.70
8.0.90.0040.00416.85
8.0.80.0130.00316.89
8.0.70.0040.00416.89
8.0.60.0040.00416.88
8.0.50.0050.00216.77
8.0.30.0100.01217.24
8.0.20.0140.01017.40
8.0.10.0050.00317.10
8.0.00.0140.00316.70
7.4.330.0030.00315.08
7.4.320.0060.00016.56
7.4.300.0050.00216.64
7.4.290.0070.00016.52
7.4.280.0000.00716.65
7.4.270.0030.00316.65
7.4.260.0000.00816.61
7.4.250.0000.00716.42
7.4.240.0040.00316.49
7.4.230.0000.00716.45
7.4.220.0030.01316.53
7.4.210.0090.00616.57
7.4.200.0050.00216.64
7.4.190.0000.00716.57
7.4.160.0160.00616.48
7.4.150.0060.01517.40
7.4.140.0120.00917.86
7.4.130.0050.01116.51
7.4.120.0100.00716.53
7.4.110.0170.00016.60
7.4.100.0120.00916.57
7.4.90.0160.00316.48
7.4.80.0100.00719.39
7.4.70.0140.00316.65
7.4.60.0120.00416.63
7.4.50.0050.00316.56
7.4.40.0060.00916.60
7.4.30.0110.00616.54
7.4.10.0110.00515.11
7.4.00.0120.00414.96
7.3.330.0000.00513.16
7.3.320.0000.00513.23
7.3.310.0000.00716.20
7.3.300.0020.00516.21
7.3.290.0100.01016.36
7.3.280.0080.01116.32
7.3.270.0100.00717.40
7.3.260.0070.01016.63
7.3.250.0070.01016.47
7.3.240.0070.01016.64
7.3.230.0120.00516.56
7.3.210.0000.01816.58
7.3.200.0060.01119.39
7.3.190.0060.01216.48
7.3.180.0060.01016.32
7.3.170.0030.01216.40
7.3.160.0060.00916.49
7.3.130.0030.01514.97
7.3.120.0080.00814.74
7.3.110.0080.01014.92
7.3.100.0080.00514.79
7.3.90.0050.00914.82
7.3.80.0090.00614.77
7.3.70.0050.00714.83
7.3.60.0070.00814.88
7.3.50.0030.01014.80
7.3.40.0070.00514.81
7.3.30.0070.00614.75
7.3.20.0080.00616.59
7.3.10.0040.01016.52
7.3.00.0060.00816.71
7.2.330.0070.01116.46
7.2.320.0080.01116.60
7.2.310.0070.01216.77
7.2.300.0060.01516.39
7.2.290.0090.00916.49
7.2.260.0050.01315.17
7.2.250.0070.01115.17
7.2.240.0090.00615.12
7.2.230.0030.01314.95
7.2.220.0040.00615.00
7.2.210.0010.01214.97
7.2.200.0040.00915.00
7.2.190.0070.00614.90
7.2.180.0040.01115.04
7.2.170.0070.00614.99
7.2.160.0040.00815.02
7.2.150.0040.01017.08
7.2.140.0050.00916.99
7.2.130.0050.01017.01
7.2.120.0020.01016.79
7.2.110.0030.01016.91
7.2.100.0030.01016.92
7.2.90.0090.00716.94
7.2.80.0050.01316.95
7.2.70.0070.00716.93
7.2.60.0050.00817.01
7.2.50.0050.01017.10
7.2.40.0090.00316.99
7.2.30.0050.01017.14
7.2.20.0070.00716.81
7.2.10.0070.00717.14
7.2.00.0050.01016.94
7.1.330.0100.00415.93
7.1.320.0030.01115.74
7.1.310.0080.00515.83
7.1.300.0060.00715.80
7.1.290.0040.00715.65
7.1.280.0060.00715.55
7.1.270.0070.00815.86
7.1.260.0030.00915.76
7.1.250.0070.00615.90
7.1.240.0030.00915.79
7.1.230.0050.00715.81
7.1.220.0080.00115.78
7.1.210.0120.00415.87
7.1.200.0020.01115.79
7.1.190.0090.00515.90
7.1.180.0020.01015.79
7.1.170.0050.00815.68
7.1.160.0030.00815.84
7.1.150.0090.00515.79
7.1.140.0070.00615.85
7.1.130.0050.00915.82
7.1.120.0050.00915.85
7.1.110.0060.00515.82
7.1.100.0080.00816.28
7.1.90.0070.00715.84
7.1.80.0060.00915.79
7.1.70.0030.00916.31
7.1.60.0070.00716.98
7.1.50.0070.00916.26
7.1.40.0030.00815.78
7.1.30.0090.00415.65
7.1.20.0070.00515.83
7.1.10.0060.00815.77
7.1.00.0050.02617.96
7.0.330.0050.00915.60
7.0.320.0070.00415.40
7.0.310.0070.00315.47
7.0.300.0040.00915.41
7.0.290.0090.00415.35
7.0.280.0020.01215.25
7.0.270.0060.00915.33
7.0.260.0010.00815.39
7.0.250.0040.01115.44
7.0.240.0050.00915.49
7.0.230.0080.00615.50
7.0.220.0080.00715.32
7.0.210.0040.00815.32
7.0.200.0040.00815.71
7.0.190.0050.00715.46
7.0.180.0090.00615.23
7.0.170.0020.01215.33
7.0.160.0090.00315.38
7.0.150.0050.00615.54
7.0.140.0030.03017.62
7.0.130.0070.00615.40
7.0.120.0050.00815.42
7.0.110.0030.00715.35
7.0.100.0020.02616.93
7.0.90.0090.02716.98
7.0.80.0060.03116.84
7.0.70.0070.03216.80
7.0.60.0020.02516.99
7.0.50.0110.02617.13
7.0.40.0060.03115.64
7.0.30.0060.03115.60
7.0.20.0030.03115.75
7.0.10.0110.02315.61
7.0.00.0040.03615.66
5.6.400.0050.00714.34
5.6.390.0060.00914.50
5.6.380.0050.00914.44
5.6.370.0050.00614.38
5.6.360.0060.01114.64
5.6.350.0070.00714.63
5.6.340.0040.00914.46
5.6.330.0080.00814.51
5.6.320.0040.00814.38
5.6.310.0060.00714.35
5.6.300.0050.00714.29
5.6.290.0070.00514.40
5.6.280.0020.03516.45
5.6.270.0080.01014.48
5.6.260.0060.00414.44
5.6.250.0040.02416.44
5.6.240.0080.03216.48
5.6.230.0060.03016.54
5.6.220.0060.01816.37
5.6.210.0080.02716.50
5.6.200.0090.02116.47
5.6.190.0080.03416.66
5.6.180.0050.03516.67
5.6.170.0080.03216.66
5.6.160.0080.03016.68
5.6.150.0070.03216.54
5.6.140.0080.02516.61
5.6.130.0040.01916.72
5.6.120.0070.02516.59
5.6.110.0060.01816.57
5.6.100.0070.01616.59
5.6.90.0030.02116.55
5.6.80.0050.01616.31
5.6.70.0040.01916.37
5.6.60.0060.03016.23
5.6.50.0050.02216.25
5.6.40.0100.01316.42
5.6.30.0040.02416.41
5.6.20.0050.02016.47
5.6.10.0070.03216.32
5.6.00.0030.01816.45
5.5.380.0060.03116.34
5.5.370.0070.03116.45
5.5.360.0060.02116.46
5.5.350.0040.03316.44
5.5.340.0040.03216.50
5.5.330.0090.02016.39
5.5.320.0020.03316.59
5.5.310.0060.03416.51
5.5.300.0070.02816.36
5.5.290.0060.01916.46
5.5.280.0020.02716.62
5.5.270.0040.02316.64
5.5.260.0050.01916.65
5.5.250.0050.01816.33
5.5.240.0100.01616.37
5.5.230.0080.01816.33
5.5.220.0020.03416.25
5.5.210.0070.01616.25
5.5.200.0050.02116.24
5.5.190.0030.02016.22
5.5.180.0050.01716.17
5.5.170.0050.01014.41
5.5.160.0080.01416.29
5.5.150.0030.02816.30
5.5.140.0050.01916.39
5.5.130.0040.02416.21
5.5.120.0020.01916.21
5.5.110.0050.02116.20
5.5.100.0070.01816.22
5.5.90.0040.03116.19
5.5.80.0020.02115.98
5.5.70.0030.02016.18
5.5.60.0110.01116.25
5.5.50.0080.01616.10
5.5.40.0110.01116.29
5.5.30.0060.01716.13
5.5.20.0060.01716.22
5.5.10.0070.01916.13
5.5.00.0020.03016.04
5.4.450.0100.01813.81
5.4.440.0050.02013.87
5.4.430.0040.01513.76
5.4.420.0020.01913.88
5.4.410.0060.01513.90
5.4.400.0050.02813.53
5.4.390.0050.01913.68
5.4.380.0090.02413.58
5.4.370.0060.02913.72
5.4.360.0040.01813.63
5.4.350.0040.02013.73
5.4.340.0050.02113.58
5.4.330.0050.00510.85
5.4.320.0030.01713.67
5.4.310.0060.01513.71
5.4.300.0050.02013.63
5.4.290.0030.01913.63
5.4.280.0070.01613.67
5.4.270.0080.01113.72
5.4.260.0080.01313.73
5.4.250.0050.01813.68
5.4.240.0090.01313.64
5.4.230.0080.01613.68
5.4.220.0050.01313.66
5.4.210.0070.01413.61
5.4.200.0060.01713.69
5.4.190.0090.01213.69
5.4.180.0020.01913.61
5.4.170.0060.01913.80
5.4.160.0060.01413.59
5.4.150.0060.02013.54
5.4.140.0020.01912.86
5.4.130.0020.01712.75
5.4.120.0050.01512.76
5.4.110.0040.01912.68
5.4.100.0030.01812.81
5.4.90.0070.01812.88
5.4.80.0060.02912.76
5.4.70.0050.02912.88
5.4.60.0040.02712.72
5.4.50.0050.02712.83
5.4.40.0080.02812.85
5.4.30.0050.02612.88
5.4.20.0060.02412.84
5.4.10.0070.02812.78
5.4.00.0090.02412.49
5.3.290.0050.01912.00
5.3.280.0050.01911.89
5.3.270.0070.01411.93
5.3.260.0070.01411.93
5.3.250.0030.01811.96
5.3.240.0060.01711.88
5.3.230.0070.01711.87
5.3.220.0070.01611.93
5.3.210.0030.02011.93
5.3.200.0050.01611.92
5.3.190.0050.02911.90
5.3.180.0050.02911.97
5.3.170.0070.02811.99
5.3.160.0090.02811.98
5.3.150.0070.03011.97
5.3.140.0100.02611.96
5.3.130.0070.01411.92
5.3.120.0060.03111.95
5.3.110.0080.02511.91
5.3.100.0080.01711.71
5.3.90.0080.02711.74
5.3.80.0050.02411.70
5.3.70.0060.02511.66
5.3.60.0110.02611.69
5.3.50.0050.02011.78
5.3.40.0040.03711.73
5.3.30.0040.03211.68
5.3.20.0090.02611.54
5.3.10.0060.02811.53
5.3.00.0060.03011.54
5.2.170.0100.03312.65
5.2.160.0100.05312.65
5.2.150.0030.05312.65
5.2.140.0070.06012.65
5.2.130.0070.04312.65
5.2.120.0070.03012.65
5.2.110.0070.03012.65
5.2.100.0000.04312.65
5.2.90.0070.06012.65
5.2.80.0070.06012.65
5.2.70.0030.07012.65
5.2.60.0070.05712.65
5.2.50.0030.06312.65
5.2.40.0070.06312.65
5.2.30.0070.06012.65
5.2.20.0030.06012.65
5.2.10.0000.06312.65
5.2.00.0130.05012.65
5.1.60.0070.03012.65
5.1.50.0130.03312.65
5.1.40.0100.04712.65
5.1.30.0030.05012.65
5.1.20.0030.06012.65
5.1.10.0030.04312.65
5.1.00.0070.05312.65
5.0.50.0000.04712.65
5.0.40.0070.04012.65
5.0.30.0070.04312.65
5.0.20.0070.04012.65
5.0.10.0000.04712.65
5.0.00.0100.06012.65
4.4.90.0070.03012.65
4.4.80.0070.03012.65
4.4.70.0000.02012.65
4.4.60.0000.03712.65
4.4.50.0030.02312.65
4.4.40.0030.05012.65
4.4.30.0070.02312.65
4.4.20.0030.02312.65
4.4.10.0030.03312.65
4.4.00.0000.04712.65
4.3.110.0000.03012.65
4.3.100.0000.03712.65
4.3.90.0070.03312.65
4.3.80.0030.05012.65
4.3.70.0000.03312.65
4.3.60.0030.02712.65
4.3.50.0070.03012.65
4.3.40.0000.03312.65
4.3.30.0000.04012.65
4.3.20.0030.03312.65
4.3.10.0030.03712.65
4.3.00.0030.03712.65

preferences:
46.22 ms | 401 KiB | 5 Q