3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = array( '1' => array ( 'name' => 123, 'id' => 105740727, 'email' => 'fghfhfh', 'phrases_relevant' => 123, 'searches_id' => 105740727, ), '2' => array ( 'name' => 'porshe', 'id' => 105713889, 'email' => 'fghfghf', 'phrases_relevant' => 'porshe', 'searches_id' => 105713889, ), '3' => array ( 'name' => 'porshe', 'id' => 105713889, 'email' => 'fghfghf', 'phrases_relevant' => 'merce', 'searches_id' => 105713889, ), ); function sortByOrder($a, $b) { return $a['searches_id'] - $b['searches_id']; } usort($myArray, 'sortByOrder'); foreach ($myArray as $key => $value) { if (empty($temp) || $temp != $value['searches_id']) { $temp = $value['searches_id']; } $result[$value['searches_id']]['email'] = $value['email']; $result[$value['searches_id']]['projects'][] = $value['phrases_relevant']; } $result = array_values($result); print_r($result);die;

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.10.0100.00916.65
8.5.00.0140.00819.89
8.4.150.0010.00114.05
8.4.140.0160.00517.81
8.4.130.0060.00317.55
8.4.120.0130.00720.84
8.4.110.0110.00922.44
8.4.100.0120.00918.00
8.4.90.0040.00817.96
8.4.80.0130.00717.96
8.4.70.0110.00718.05
8.4.60.0040.00718.88
8.4.50.0140.00720.50
8.4.40.0130.00619.49
8.4.30.0170.00020.29
8.4.20.0070.01320.65
8.4.10.0070.01119.54
8.3.280.0060.01418.50
8.3.270.0120.01016.66
8.3.260.0140.00216.58
8.3.250.0100.00918.79
8.3.240.0140.00617.13
8.3.230.0120.00616.94
8.3.220.0140.00417.35
8.3.210.0080.01216.82
8.3.200.0060.00316.91
8.3.190.0120.00618.83
8.3.180.0120.00719.14
8.3.170.0100.01016.55
8.3.160.0110.00317.26
8.3.150.0070.01116.82
8.3.140.0060.00319.00
8.3.130.0110.00718.82
8.3.120.0050.00318.87
8.3.110.0080.00020.94
8.3.100.0090.00616.88
8.3.90.0060.00326.77
8.3.80.0030.00616.87
8.3.70.0190.00316.63
8.3.60.0070.00718.30
8.3.50.0050.01317.56
8.3.40.0120.00318.71
8.3.30.0080.00818.79
8.3.20.0000.00720.85
8.3.10.0040.00419.13
8.3.00.0080.00021.73
8.2.290.0080.01120.52
8.2.280.0030.00518.55
8.2.270.0070.01516.61
8.2.260.0090.00616.86
8.2.250.0030.00516.61
8.2.240.0060.00318.82
8.2.230.0030.00722.58
8.2.220.0090.00024.06
8.2.210.0080.00026.77
8.2.200.0080.00316.75
8.2.190.0030.01718.50
8.2.180.0070.00725.92
8.2.170.0070.01422.96
8.2.160.0140.00020.28
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0030.00619.45
8.2.100.0090.00317.70
8.2.90.0050.00317.80
8.2.80.0050.00317.97
8.2.70.0000.00818.05
8.2.60.0000.00818.06
8.2.50.0060.00319.32
8.2.40.0040.00419.29
8.2.30.0080.00019.21
8.2.20.0000.00718.11
8.2.10.0040.00418.94
8.2.00.0070.00019.49
8.1.330.0100.00821.90
8.1.320.0050.00418.09
8.1.310.0120.00616.21
8.1.300.0030.00618.12
8.1.290.0030.00630.84
8.1.280.0040.01425.92
8.1.270.0040.00420.74
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0000.00923.96
8.1.230.0060.00620.98
8.1.220.0030.00617.80
8.1.210.0030.00519.04
8.1.200.0040.00417.36
8.1.190.0100.00516.98
8.1.180.0040.00418.10
8.1.170.0030.00518.61
8.1.160.0050.00218.94
8.1.150.0040.00418.89
8.1.140.0050.00317.45
8.1.130.0030.00520.13
8.1.120.0000.00717.46
8.1.110.0040.00417.53
8.1.100.0040.00417.47
8.1.90.0000.00717.52
8.1.80.0000.00717.48
8.1.70.0030.00317.47
8.1.60.0060.00317.48
8.1.50.0040.00417.58
8.1.40.0040.00417.49
8.1.30.0000.00817.61
8.1.20.0000.00817.52
8.1.10.0060.00317.50
8.1.00.0000.00817.40
8.0.300.0020.00519.89
8.0.290.0040.00416.88
8.0.280.0000.00718.45
8.0.270.0000.00717.14
8.0.260.0030.00318.36
8.0.250.0030.00317.00
8.0.240.0000.00716.99
8.0.230.0070.00017.02
8.0.220.0060.00316.97
8.0.210.0000.00716.94
8.0.200.0040.00417.02
8.0.190.0040.00416.96
8.0.180.0000.00817.02
8.0.170.0000.00916.98
8.0.160.0070.00016.92
8.0.150.0040.00416.92
8.0.140.0050.00316.82
8.0.130.0000.00713.35
8.0.120.0050.00316.95
8.0.110.0070.00016.87
8.0.100.0040.00417.00
8.0.90.0000.00816.83
8.0.80.0120.00616.97
8.0.70.0040.00417.00
8.0.60.0000.00716.92
8.0.50.0000.00716.93
8.0.30.0160.00817.04
8.0.20.0090.01017.23
8.0.10.0000.00717.19
8.0.00.0080.01016.79
7.4.330.0000.00615.55
7.4.320.0060.00016.62
7.4.300.0000.00716.61
7.4.290.0000.00716.40
7.4.280.0000.00716.55
7.4.270.0000.00716.62
7.4.260.0030.00316.58
7.4.250.0040.00416.46
7.4.240.0040.00416.44
7.4.230.0000.00716.45
7.4.220.0050.00316.34
7.4.210.0090.00716.52
7.4.200.0030.00316.30
7.4.140.0160.00617.86
7.4.130.0170.00016.44
7.4.120.0130.00316.69
7.4.110.0070.01116.44
7.4.100.0060.01616.58
7.4.90.0160.00316.61
7.4.80.0070.01619.39
7.4.70.0110.00616.54
7.4.60.0060.01016.39
7.4.50.0040.01416.68
7.4.40.0040.01216.54
7.4.10.0090.00914.79
7.4.00.0050.01114.74
7.3.330.0020.00213.51
7.3.320.0030.00313.25
7.3.310.0030.00516.33
7.3.300.0050.00216.30
7.3.290.0000.00716.35
7.3.280.0080.00716.43
7.3.260.0110.00716.50
7.3.240.0040.01316.50
7.3.230.0120.00616.50
7.3.210.0130.00316.60
7.3.200.0030.01316.46
7.3.190.0140.00416.66
7.3.180.0040.01816.36
7.3.170.0170.00316.45
7.3.160.0070.01416.37
7.3.130.0120.00615.14
7.3.120.0040.01615.02
7.3.110.0120.00514.61
7.3.100.0050.01015.04
7.3.90.0090.00314.77
7.3.80.0080.00314.86
7.3.70.0080.00814.89
7.3.60.0050.00714.82
7.3.50.0040.00914.85
7.3.40.0070.00514.86
7.3.30.0090.00814.86
7.3.20.0080.00716.77
7.3.10.0080.00616.72
7.3.00.0070.00916.66
7.2.330.0070.01016.75
7.2.320.0070.01116.37
7.2.310.0080.01516.47
7.2.300.0090.00816.66
7.2.290.0100.00716.59
7.2.260.0040.01414.99
7.2.250.0070.01014.84
7.2.240.0070.01115.10
7.2.230.0060.00815.23
7.2.220.0070.00715.20
7.2.210.0030.01415.15
7.2.200.0080.00614.79
7.2.190.0050.00915.18
7.2.180.0050.00814.99
7.2.170.0080.01015.10
7.2.160.0070.01014.90
7.2.150.0040.01116.84
7.2.140.0060.00716.86
7.2.130.0050.01016.94
7.2.120.0050.01316.97
7.2.110.0100.00516.91
7.2.100.0040.01216.96
7.2.90.0080.00916.94
7.2.80.0080.00617.09
7.2.70.0080.00816.82
7.2.60.0000.01416.82
7.2.50.0090.00716.97
7.2.40.0100.00516.93
7.2.30.0090.00617.05
7.2.20.0040.01016.92
7.2.10.0080.00916.81
7.2.00.0050.01016.77
7.1.330.0040.00915.57
7.1.320.0030.01015.82
7.1.310.0070.00715.81
7.1.300.0070.00815.71
7.1.290.0050.00915.83
7.1.280.0070.00915.66
7.1.270.0060.00715.86
7.1.260.0040.00915.81
7.1.250.0020.01415.83
7.1.240.0000.01116.00
7.1.230.0070.00715.68
7.1.220.0110.00415.83
7.1.210.0030.01015.79
7.1.200.0030.01015.97
7.1.190.0070.00715.68
7.1.180.0040.00815.60
7.1.170.0040.01115.76
7.1.160.0070.00715.84
7.1.150.0070.00716.07
7.1.140.0060.00615.71
7.1.130.0030.01315.94
7.1.120.0100.00715.91
7.1.110.0090.00615.96
7.1.100.0070.01015.78
7.1.90.0130.00315.79
7.1.80.0060.01215.63
7.1.70.0060.00915.92
7.1.60.0030.01515.68
7.1.50.0040.01115.86
7.1.40.0150.00015.99
7.1.30.0090.00615.85
7.1.20.0000.01115.77
7.1.10.0030.00615.59
7.1.00.0000.01715.79

preferences:
37.05 ms | 403 KiB | 5 Q