3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array( 'keywordid' => 98, 'keyword' => 'sample keyword 34', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 99, 'keyword' => 'sample keyword 35', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 100, 'keyword' => 'sample keyword 36', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 97, 'keyword' => 'sample keyword 37', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 96, 'keyword' => 'sample keyword 38', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 95, 'keyword' => 'sample keyword 39', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 94, 'keyword' => 'sample keyword 40', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 93, 'keyword' => 'sample keyword 41', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 92, 'keyword' => 'sample keyword 42', 'type' => 'NATURAL', 'longname' => 'UK' ), array( 'keywordid' => 91, 'keyword' => 'sample keyword 43', 'type' => 'NATURAL', 'longname' => 'UK' ) ); $order = array(100, 91, 95); $order = array_flip($order); $noMatchBucket = count($order); $temp = array_fill(0, $noMatchBucket + 1, array()); foreach ($data as $item) { $bucket = isset($order[$item['keywordid']]) ? $order[$item['keywordid']] : $noMatchBucket; $temp[$bucket][] = $item; } $data = array(); foreach ($temp as $bucket) { $data = array_merge($data, $bucket); } print_r($data);

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.1rc20.0040.00417.07
8.1rc10.0040.00416.99
8.0.100.0000.00816.81
8.0.90.0000.00816.95
8.0.80.0060.01016.96
8.0.70.0030.00516.98
8.0.60.0000.00716.86
8.0.50.0000.00816.75
8.0.30.0100.01116.97
8.0.20.0090.00917.40
8.0.10.0030.00516.92
8.0.00.0080.01316.73
7.4.230.0000.00816.64
7.4.220.0040.01216.64
7.4.210.0120.00316.66
7.4.200.0000.00716.53
7.4.190.0000.00716.58
7.4.160.0160.00016.52
7.4.150.0220.00617.40
7.4.140.0080.01217.86
7.4.130.0040.01216.56
7.4.120.0130.00716.53
7.4.110.0110.00716.65
7.4.100.0110.00716.58
7.4.90.0110.00616.59
7.4.80.0070.01316.59
7.4.70.0130.01016.59
7.4.60.0070.01016.68
7.4.50.0050.00316.41
7.4.40.0030.01222.77
7.4.30.0100.00716.63
7.4.10.0090.00914.77
7.4.00.0050.01114.83
7.3.300.0000.00716.37
7.3.290.0100.00716.29
7.3.280.0100.00916.38
7.3.270.0080.00917.40
7.3.260.0090.00916.37
7.3.250.0130.00816.48
7.3.240.0130.00316.40
7.3.230.0140.00416.39
7.3.210.0140.00416.68
7.3.200.0070.01019.39
7.3.190.0120.00416.52
7.3.180.0060.01216.44
7.3.170.0090.00616.54
7.3.160.0100.00516.55
7.3.130.0110.00714.72
7.3.120.0100.00515.02
7.3.110.0040.01514.86
7.3.100.0040.01115.07
7.3.90.0110.00415.07
7.3.80.0070.00714.71
7.3.70.0000.01114.68
7.3.60.0120.00315.09
7.3.50.0080.00814.90
7.3.40.0030.00714.54
7.3.30.0090.00014.79
7.3.20.0030.00916.40
7.3.10.0030.01116.84
7.3.00.0040.00816.58
7.2.330.0130.00516.85
7.2.320.0060.01116.64
7.2.310.0120.00616.52
7.2.300.0120.00816.72
7.2.290.0060.01016.59
7.2.260.0030.00914.95
7.2.250.0030.00715.29
7.2.240.0080.00815.29
7.2.230.0030.01415.05
7.2.220.0110.00415.02
7.2.210.0110.00415.02
7.2.200.0070.00715.10
7.2.190.0090.00915.08
7.2.180.0060.00615.20
7.2.170.0030.00615.18
7.2.160.0000.01415.14
7.2.150.0070.00717.10
7.2.140.0080.00816.78
7.2.130.0060.00916.97
7.2.120.0110.00416.93
7.2.110.0020.01016.83
7.2.100.0070.00516.89
7.2.90.0070.01116.95
7.2.80.0050.01116.78
7.2.70.0100.00617.00
7.2.60.0090.00816.82
7.2.50.0050.01517.03
7.2.40.0040.00917.07
7.2.30.0090.00917.00
7.2.20.0090.00516.81
7.2.10.0070.00516.98
7.2.00.0100.00517.73
7.1.330.0060.00615.95
7.1.320.0040.01115.61
7.1.310.0000.00815.57
7.1.300.0030.01215.84
7.1.290.0000.01215.82
7.1.280.0060.00915.52
7.1.270.0030.01015.60
7.1.260.0070.00715.66
7.1.250.0070.00715.76
7.1.240.0030.01015.71
7.1.230.0040.00415.91
7.1.220.0050.00515.98
7.1.210.0120.00615.63
7.1.200.0040.00815.67
7.1.190.0030.01015.93
7.1.180.0030.01216.00
7.1.170.0120.00315.51
7.1.160.0070.00316.02
7.1.150.0000.00915.96
7.1.140.0040.01115.86
7.1.130.0060.00315.63
7.1.120.0060.00815.68
7.1.110.0000.01015.75
7.1.100.0000.01316.99
7.1.90.0000.01515.73
7.1.80.0070.00715.88
7.1.70.0080.00516.66
7.1.60.0070.01217.60
7.1.50.0030.00916.28
7.1.40.0060.00916.00
7.1.30.0090.00315.88
7.1.20.0030.01415.78
7.1.10.0000.01015.87
7.1.00.0050.04219.09
7.0.330.0030.01115.52
7.0.320.0090.00915.27
7.0.310.0030.00715.38
7.0.300.0110.00715.44
7.0.290.0050.00515.53
7.0.280.0090.00915.39
7.0.270.0040.00815.44
7.0.260.0060.00915.32
7.0.250.0000.01215.23
7.0.240.0080.00815.48
7.0.230.0060.00915.42
7.0.220.0030.01215.39
7.0.210.0120.00315.20
7.0.200.0150.01115.21
7.0.190.0040.01115.33
7.0.180.0030.01015.56
7.0.170.0000.00915.50
7.0.160.0000.01215.28
7.0.150.0000.00915.54
7.0.140.0120.03218.84
7.0.130.0120.00315.48
7.0.120.0000.00915.53
7.0.110.0060.00615.54
7.0.100.0000.01615.50
7.0.90.0060.00615.22
7.0.80.0130.00615.66
7.0.70.0070.00715.25
7.0.60.0110.02017.75
7.0.50.0090.04216.74
7.0.40.0070.04516.77
7.0.30.0230.03816.84
7.0.20.0230.03816.79
7.0.10.0140.02916.86
7.0.00.0130.03316.81
5.6.400.0070.00714.40
5.6.390.0070.00714.70
5.6.380.0100.01014.71
5.6.370.0090.00314.56
5.6.360.0040.01514.68
5.6.350.0100.00714.80
5.6.340.0100.01014.54
5.6.330.0030.01314.63
5.6.320.0060.00314.36
5.6.310.0090.00614.67
5.6.300.0100.00314.65
5.6.290.0180.00014.16
5.6.280.0050.04317.69
5.6.270.0040.01114.58
5.6.260.0090.00314.21
5.6.250.0100.00314.79
5.6.240.0030.01014.63
5.6.230.0060.00614.29
5.6.220.0030.01414.40
5.6.210.0130.04217.59
5.6.200.0030.04316.32
5.6.190.0050.03417.36
5.6.180.0070.02217.53
5.6.170.0130.05117.47
5.6.160.0100.04317.50
5.6.150.0090.04216.31
5.6.140.0030.02816.39
5.6.130.0070.02216.28
5.6.120.0030.02617.81
5.6.110.0050.02817.68
5.6.100.0070.04317.74
5.6.90.0090.03517.58
5.6.80.0070.04017.47
5.6.70.2220.02717.46
5.6.60.0000.01714.37
5.6.50.0120.00014.52
5.6.40.0100.00314.13
5.6.30.0040.00714.48
5.6.20.0040.00714.17
5.6.10.0000.01014.66
5.6.00.0000.00914.55
5.5.380.0100.00314.51
5.5.370.0130.00614.65
5.5.360.0070.00314.36
5.5.350.0050.04517.54
5.5.340.0090.02616.17
5.5.330.0050.02617.37
5.5.320.0060.04817.33
5.5.310.0150.04417.24
5.5.300.0050.03316.13
5.5.290.0050.03816.06
5.5.280.0080.04517.71
5.5.270.0050.02517.78
5.5.260.0110.04017.52
5.5.250.0120.04117.53
5.5.240.0130.03817.23
5.5.230.0120.00614.34
5.5.220.0090.00914.16
5.5.210.0000.01414.16
5.5.200.0030.00614.48
5.5.190.0100.00314.29
5.5.180.0110.00614.15
5.5.170.0060.00614.66
5.5.160.0030.01314.42
5.5.150.0090.01214.45
5.5.140.0110.00714.15
5.5.130.0060.00614.41
5.5.120.0090.00914.34
5.5.110.0030.01314.51
5.5.100.0000.01314.59
5.5.90.0030.00914.55
5.5.80.0050.00514.43
5.5.70.0030.01014.64
5.5.60.0120.00614.09
5.5.50.0080.00814.19
5.5.40.0090.00414.35
5.5.30.0070.00714.38
5.5.20.0070.01314.46
5.5.10.0110.00714.32
5.5.00.0080.00814.43
5.4.450.0180.02515.48
5.4.440.0120.02315.58
5.4.430.0240.02215.46
5.4.420.0230.03015.40
5.4.410.0160.02415.50
5.4.400.0230.04115.07
5.4.390.0230.03315.13
5.4.380.0100.03315.19
5.4.370.0170.03315.18
5.4.360.0110.03315.19
5.4.350.0160.02715.06
5.4.340.0240.02815.20
5.4.330.0080.00411.64
5.4.320.0100.02012.07
5.4.310.0080.02712.07
5.4.300.0060.02612.07
5.4.290.0040.02612.07
5.4.280.0060.02212.02
5.4.270.0090.02212.02
5.4.260.0080.02212.02
5.4.250.0080.02112.02
5.4.240.0060.02212.02
5.4.230.0070.02212.01
5.4.220.0060.02612.01
5.4.210.0080.02212.01
5.4.200.0090.02212.01
5.4.190.0110.03012.00
5.4.180.0180.02612.00
5.4.170.0140.02512.01
5.4.160.0150.02712.01
5.4.150.0170.02512.00
5.4.140.0100.03111.84
5.4.130.0100.02811.84
5.4.120.0170.02111.82
5.4.110.0140.02211.81
5.4.100.0160.02311.82
5.4.90.0100.03111.82
5.4.80.0120.02511.81
5.4.70.0140.02311.81
5.4.60.0120.03411.81
5.4.50.0130.03011.81
5.4.40.0270.04211.81
5.4.30.0120.02611.81
5.4.20.0090.02411.81
5.4.10.0100.02911.81
5.4.00.0130.02411.55
5.3.290.0080.02712.22
5.3.280.0090.02112.17
5.3.270.0270.04612.18
5.3.260.0120.02712.18
5.3.250.0160.02612.18
5.3.240.0280.05212.18
5.3.230.0130.02412.17
5.3.220.0150.02512.16
5.3.210.0130.02812.16
5.3.200.0130.02712.16
5.3.190.0070.03312.16
5.3.180.0140.02412.16
5.3.170.0100.02712.15
5.3.160.0100.02612.15
5.3.150.0150.02512.16
5.3.140.0210.05112.15
5.3.130.0120.02812.15
5.3.120.0130.02312.15
5.3.110.0130.02912.15
5.3.100.0190.03711.88
5.3.90.0170.02411.87
5.3.80.0280.04311.87
5.3.70.0180.03111.87
5.3.60.0230.04411.85
5.3.50.0240.04611.83
5.3.40.0230.04611.83
5.3.30.0120.02511.81
5.3.20.0180.02011.70
5.3.10.0140.02211.69
5.3.00.0200.04611.68
5.2.170.0240.0409.22
5.2.160.0430.0789.22
5.2.150.0190.0319.21
5.2.140.0140.0379.21
5.2.130.0130.0369.18
5.2.120.0140.0359.18
5.2.110.0250.0899.17
5.2.100.0120.0389.18
5.2.90.0160.0329.18
5.2.80.0140.0399.18
5.2.70.0110.0409.17
5.2.60.0290.0799.13
5.2.50.0120.0369.09
5.2.40.0130.0359.07
5.2.30.0160.0369.05
5.2.20.0200.0399.04
5.2.10.0130.0358.94
5.2.00.0170.0308.79
5.1.60.0110.0328.09
5.1.50.0340.0708.08
5.1.40.0170.0278.06
5.1.30.0190.0278.41
5.1.20.0230.0558.44
5.1.10.0120.0338.16
5.1.00.0120.0338.16
5.0.50.0130.0226.64
5.0.40.0110.0266.50
5.0.30.0120.0356.32
5.0.20.0140.0246.29
5.0.10.0100.0256.26
5.0.00.0310.0776.26
4.4.90.0080.0184.78
4.4.80.0090.0194.76
4.4.70.0090.0204.75
4.4.60.0140.0174.75
4.4.50.0140.0184.77
4.4.40.0110.0584.71
4.4.30.0080.0194.76
4.4.20.0090.0204.85
4.4.10.0070.0204.85
4.4.00.0060.0324.76
4.3.110.0080.0194.66
4.3.100.0090.0194.67
4.3.90.0070.0194.64
4.3.80.0110.0244.58
4.3.70.0080.0214.63
4.3.60.0090.0204.63
4.3.50.0120.0464.63
4.3.40.0050.0314.54
4.3.30.0090.0163.32
4.3.20.0050.0203.31
4.3.10.0070.0183.26
4.3.00.0100.01712.90

preferences:
15.27 ms | 454 KiB | 5 Q