3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_values = array( 'Bridge Work' => array( array('Name' => 'NJ Trunpike_Bridge Repair Work', 'Location' => 'New Jersey', 'State' => 'New Jersey'), array('Name' => 'Honoapiilani Highway Bridge Truss', 'Location' => 'Maui', 'State' => 'Hawaii'), array('Name' => 'BlueCross Blueshield of Tennessee (Bridge)', 'Location' => 'Memphis', 'State' => 'Tennessee'), array('Name' => 'Henderson Center Connector Bridge', 'Location' => 'Coquitlam', 'State' => 'British Columbia'), ), 'Educational' => array( array('Name' => 'RTI TASS Complex Admin Bldg', 'Location' => 'Bluffdale', 'State' => 'Utah'), array('Name' => 'Auburn High School', 'Location' => 'Auburn', 'State' => 'Washington'), array('Name' => 'Reed College', 'Location' => 'Portland', 'State' => 'Oregon'), array('Name' => 'Shorewood High School', 'Location' => 'Shoreline', 'State' => 'Washington'), ),); function my_sort($my_array, $my_key) { $sorted_values = array(); foreach($my_array as $key => $value) { $columns = null; foreach ($value as $index => $element) { $columns[] = $element[$my_key]; } $temp = $value; array_multisort($columns, SORT_ASC, $temp); $sorted_values[$key] = $temp; } return $sorted_values; } $result = my_sort($original_values, 'State'); echo '<pre>'; print_r($result); echo '</pre>';

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.60.0040.01116.50
8.3.50.0100.01021.97
8.3.40.0120.00318.84
8.3.30.0070.00719.21
8.3.20.0050.00220.20
8.3.10.0060.00323.40
8.3.00.0040.00419.51
8.2.180.0040.01116.50
8.2.170.0070.00722.96
8.2.160.0080.00520.39
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0040.00422.20
8.2.110.0060.00321.98
8.2.100.0040.00717.79
8.2.90.0040.00419.14
8.2.80.0040.00417.97
8.2.70.0000.00817.62
8.2.60.0060.00318.05
8.2.50.0030.00618.07
8.2.40.0030.00518.16
8.2.30.0040.00418.08
8.2.20.0070.00017.74
8.2.10.0030.00618.02
8.2.00.0100.00017.77
8.1.280.0040.01125.92
8.1.270.0040.00423.84
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00323.82
8.1.230.0000.01119.04
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.22
8.1.190.0000.00817.55
8.1.180.0040.00818.10
8.1.170.0070.00318.58
8.1.160.0000.00722.07
8.1.150.0070.00018.64
8.1.140.0040.00417.45
8.1.130.0000.00717.72
8.1.120.0040.00417.54
8.1.110.0000.00717.37
8.1.100.0030.00417.48
8.1.90.0000.00817.44
8.1.80.0000.00817.51
8.1.70.0000.00717.42
8.1.60.0080.00017.49
8.1.50.0050.00317.42
8.1.40.0040.00417.46
8.1.30.0000.00817.64
8.1.20.0040.00417.63
8.1.10.0000.00717.49
8.1.00.0050.00217.54
8.0.300.0000.00718.77
8.0.290.0080.00017.16
8.0.280.0000.00718.37
8.0.270.0050.00217.32
8.0.260.0000.00617.19
8.0.250.0040.00416.91
8.0.240.0080.00016.92
8.0.230.0050.00217.04
8.0.220.0000.00816.85
8.0.210.0050.00216.98
8.0.200.0000.00616.92
8.0.190.0030.00617.01
8.0.180.0070.00016.91
8.0.170.0040.00416.89
8.0.160.0000.00716.79
8.0.150.0050.00516.84
8.0.140.0040.00416.82
8.0.130.0000.00513.34
8.0.120.0000.00816.82
8.0.110.0000.00716.91
8.0.100.0030.00516.94
8.0.90.0040.00416.76
8.0.80.0070.00716.86
8.0.70.0040.00416.90
8.0.60.0000.00716.80
8.0.50.0000.00716.82
8.0.30.0130.01017.10
8.0.20.0110.00817.40
8.0.10.0000.00716.87
8.0.00.0060.01116.67
7.4.330.0000.00515.00
7.4.320.0000.00716.41
7.4.300.0030.00316.53
7.4.290.0000.00816.47
7.4.280.0040.00416.57
7.4.270.0040.00316.63
7.4.260.0030.00316.40
7.4.250.0080.00016.50
7.4.240.0020.00516.42
7.4.230.0030.00316.53
7.4.220.0120.00416.64
7.4.210.0090.01016.58
7.4.200.0080.00016.72
7.4.190.0070.00016.61
7.4.160.0040.01216.50
7.4.150.0080.01117.40
7.4.140.0110.00817.86
7.4.130.0100.00816.48
7.4.120.0020.01616.42
7.4.110.0080.01216.51
7.4.100.0110.00616.44
7.4.90.0130.00416.52
7.4.80.0110.01119.39
7.4.70.0060.01116.46
7.4.60.0060.01116.52
7.4.50.0050.00316.48
7.4.40.0090.00622.77
7.4.30.0100.00716.56
7.4.00.0100.00614.84
7.3.330.0050.00013.35
7.3.320.0030.00313.17
7.3.310.0000.00816.37
7.3.300.0070.00016.24
7.3.290.0090.00916.42
7.3.280.0110.00816.34
7.3.270.0130.00717.40
7.3.260.0150.00816.59
7.3.250.0160.00816.57
7.3.240.0100.00716.56
7.3.230.0040.01216.54
7.3.210.0220.00316.55
7.3.200.0110.01119.39
7.3.190.0090.00916.55
7.3.180.0100.00616.37
7.3.170.0080.00716.65
7.3.160.0060.00916.56
7.3.120.0090.00914.80
7.2.330.0030.01416.70
7.2.320.0100.00716.59
7.2.310.0090.00916.86
7.2.300.0060.00916.60
7.2.290.0060.01016.87
7.2.00.0000.01419.56
7.1.100.0000.01118.24
7.1.70.0000.00817.14
7.1.60.0170.00719.46
7.1.50.0120.00916.69
7.1.00.0070.07322.50
7.0.200.0000.00716.96
7.0.140.0000.07722.08
7.0.60.0130.06019.80
7.0.50.0000.04317.88
7.0.40.0030.05020.14
7.0.30.0370.05320.23
7.0.20.0430.06020.11
7.0.10.0130.04320.07
7.0.00.0070.09020.05
5.6.280.0070.07320.80
5.6.210.0130.07720.51
5.6.200.0070.04718.23
5.6.190.0070.08020.52
5.6.180.0230.04320.46
5.6.170.0230.06020.44
5.6.160.0030.08020.43
5.6.150.0170.05018.14
5.6.140.0070.07018.29
5.6.130.0100.06318.27
5.6.120.0070.08320.93
5.6.110.0070.07721.01
5.6.100.0130.04721.04
5.6.90.0030.08720.96
5.6.80.0170.06720.55
5.5.350.0130.03720.50
5.5.340.0070.08318.03
5.5.330.0030.06320.43
5.5.320.0330.07020.42
5.5.310.0270.08320.36
5.5.300.0100.07318.02
5.5.290.0070.05718.02
5.5.280.0100.05020.68
5.5.270.0030.04720.64
5.5.260.0070.07020.88
5.5.250.0130.04720.66
5.5.240.0170.03320.37
5.4.450.1230.04719.32
5.4.440.1000.05719.43
5.4.430.0930.03319.30
5.4.420.1230.03319.54
5.4.410.0130.03319.04
5.4.400.1470.03019.14
5.4.390.0930.03019.09
5.4.380.0370.05318.63
5.4.370.0300.06318.48
5.4.360.1030.05318.52
5.4.350.0430.05718.80
5.4.340.0370.05018.84
5.4.320.0090.04112.51
5.4.310.0100.04112.51
5.4.300.0070.03812.51
5.4.290.0090.03812.51
5.4.280.0120.05212.38
5.4.270.0090.03612.38
5.4.260.0080.03912.38
5.4.250.0140.03612.38
5.4.240.0140.03112.38
5.4.230.0110.04812.37
5.4.220.0090.03812.37
5.4.210.0100.03612.37
5.4.200.0110.03712.37
5.4.190.0080.04012.36
5.4.180.0080.03912.37
5.4.170.0130.03812.38
5.4.160.0120.04412.37
5.4.150.0190.04812.37
5.4.140.0130.05112.05
5.4.130.0120.04912.04
5.4.120.0130.05312.00
5.4.110.0120.05111.99
5.4.100.0090.04812.00
5.4.90.0130.06111.99
5.4.80.0110.05612.00
5.4.70.0120.05011.99
5.4.60.0090.03811.99
5.4.50.0080.05411.99
5.4.40.0230.06611.98
5.4.30.0200.06211.98
5.4.20.0170.04511.97
5.4.10.0150.05611.97
5.4.00.0130.04711.47
5.3.290.0050.04112.80
5.3.280.0240.05712.71
5.3.270.0120.05612.72
5.3.260.0190.05112.72
5.3.250.0150.05912.72
5.3.240.0120.05612.72
5.3.230.0120.04612.71
5.3.220.0120.04312.68
5.3.210.0110.04312.68
5.3.200.0090.04312.68
5.3.190.0080.04612.68
5.3.180.0150.03512.68
5.3.170.0080.04512.67
5.3.160.0120.04612.68
5.3.150.0100.04012.68
5.3.140.0110.04112.66
5.3.130.0100.05412.65
5.3.120.0150.04212.66
5.3.110.0120.04612.66
5.3.100.0110.05112.12
5.3.90.0120.04212.09
5.3.80.0090.03812.08
5.3.70.0110.03912.07
5.3.60.0100.03912.06
5.3.50.0080.05012.00
5.3.40.0120.04812.00
5.3.30.0100.04911.96
5.3.20.0080.03911.75
5.3.10.0060.03711.71
5.3.00.0110.03711.70
5.2.170.0120.0299.20
5.2.160.0100.0319.19
5.2.150.0060.0399.19
5.2.140.0080.0389.19
5.2.130.0060.0319.15
5.2.120.0080.0379.14
5.2.110.0090.0359.16
5.2.100.0130.0389.16
5.2.90.0120.0379.15
5.2.80.0060.0339.16
5.2.70.0100.0299.15
5.2.60.0080.0349.11
5.2.50.0060.0319.08
5.2.40.0080.0279.05
5.2.30.0110.0269.03
5.2.20.0090.0419.02
5.2.10.0070.0328.93
5.2.00.0070.0308.80
5.1.60.0130.0228.08
5.1.50.0070.0298.07
5.1.40.0030.0278.06
5.1.30.0070.0308.41
5.1.20.0090.0298.43
5.1.10.0070.0258.16
5.1.00.0050.0288.15
5.0.50.0050.0226.63
5.0.40.0050.0196.50
5.0.30.0070.0396.31
5.0.20.0040.0226.28
5.0.10.0050.0216.25
5.0.00.0060.0316.25
4.4.90.0050.0144.78
4.4.80.0050.0164.76
4.4.70.0030.0164.75
4.4.60.0070.0144.76
4.4.50.0080.0134.77
4.4.40.0040.0254.70
4.4.30.0030.0184.76
4.4.20.0090.0204.84
4.4.10.0080.0174.85
4.4.00.0060.0244.76
4.3.110.0060.0154.66
4.3.100.0030.0174.66
4.3.90.0080.0124.64
4.3.80.0060.0244.59
4.3.70.0050.0144.63
4.3.60.0050.0144.63
4.3.50.0060.0144.62
4.3.40.0060.0234.54
4.3.30.0030.0153.32
4.3.20.0060.0143.30
4.3.10.0040.0163.25
4.3.00.0400.01313.47

preferences:
75.9 ms | 401 KiB | 5 Q