3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', false); $cats = array( (object) array("term_id"=>"","name"=>"Film : FIILMTOFTWFUT : post-COLON2","slug" => "alphabetical-k-l-m-n-o ","term_group"=>5,"term_taxonomy_id"=>9,"taxonomy"=>"Myanmar","description"=>"69509","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=> "Country: Cambodia ","slug"=>"Media Relations","term_group"=>5,"term_taxonomy_id"=>7,"taxonomy"=>"Belgium","description"=>"14234","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Advertising","slug"=>"Quality Assurance","term_group"=>5,"term_taxonomy_id"=>1,"taxonomy"=>"Norfolk Island","description"=>"93236","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Finances","slug"=>"Legal Department","term_group"=>5,"term_taxonomy_id"=>5,"taxonomy"=>"Honduras","description"=>"74759","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Legal Department","slug"=>"Media Relations","term_group"=>1,"term_taxonomy_id"=>9,"taxonomy"=>"Namibia","description"=>"69625","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Sales and Marketing","slug"=>"Advertising","term_group"=>2,"term_taxonomy_id"=>4,"taxonomy"=>"Syria","description"=>"56469","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Finances","slug"=>"Media Relations","term_group"=>5,"term_taxonomy_id"=>8,"taxonomy"=>"Ethiopia","description"=>"74909","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Media Relations","slug"=>"Asset Management","term_group"=>5,"term_taxonomy_id"=>9,"taxonomy"=>"Indonesia","description"=>"17623","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Finances","slug"=>"Customer Relations","term_group"=>2,"term_taxonomy_id"=>3,"taxonomy"=>"Zimbabwe","description"=>"83249","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Sales and Marketing","slug" => "alphabetical-k-l-m-n-o ","term_group"=>1,"term_taxonomy_id"=>10,"taxonomy"=>"Faroe Islands","description"=>"03778","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Sales and Marketing","slug"=>"Sales and Marketing","term_group"=>7,"term_taxonomy_id"=>3,"taxonomy"=>"Latvia","description"=>"68525","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Accounting","slug"=>"Research and Development","term_group"=>9,"term_taxonomy_id"=>7,"taxonomy"=>"Bouvet Island","description"=>"18959","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Asset Management","slug"=>"Advertising","term_group"=>1,"term_taxonomy_id"=>9,"taxonomy"=>"Tajikistan","description"=>"94796","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Tech Support : arstatf","slug"=>"Accounting","term_group"=>5,"term_taxonomy_id"=>7,"taxonomy"=>"Côte D'Ivoire (Ivory Coast)","description"=>"24209","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Film : FIILMTOFTWFUT : post-COLON2","slug"=>"Human Resources","term_group"=>9,"term_taxonomy_id"=>3,"taxonomy"=>"Ukraine","description"=>"77647","parent"=>"","count"=>"1"), (object) array("term_id"=>"","name"=>"Media Relations","slug"=>"Customer Service","term_group"=>6,"term_taxonomy_id"=>7,"taxonomy"=>"Maldives","description"=>"97264","parent"=>"","count"=>"1") ); //list($k, $v) = //print_r(explode(' ',$cat->name,2)); //$result[$k]=$v; // $result[] = array_map(function($v){ // return explode(" ", $v); // }, $cat); function getStuff($o) { //$z= get_object_vars($o); //print $o->name; $o = (array)$o; $nameParts = explode(' ',$o['name'],2); list($o['category'], $o['name']) = $nameParts; return $o=(object)$o; ; } $a=array_map('getStuff', $cats); //var_dump($a); $filtered_categories = array(); foreach($a as $element => $value) { $filtered_categories[$value->category][$key] = $value; echo "{$filtered_categories[$value->category][$key]}, {$value}\n"; } ksort($filtered_categories, SORT_REGULAR); //foreach ($filtered_categories as $key => $val) { // echo "$key = $val\n"; //} ?>

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.0120.00318.55
8.3.50.0130.00522.11
8.3.40.0120.00318.79
8.3.30.0080.00619.04
8.3.20.0000.00918.77
8.3.10.0090.00023.50
8.3.00.0040.00419.05
8.2.180.0100.00616.63
8.2.170.0150.00019.00
8.2.160.0080.00622.96
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00822.04
8.2.110.0070.00320.29
8.2.100.0040.00818.16
8.2.90.0050.00319.40
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0000.00917.93
8.2.50.0060.00318.07
8.2.40.0000.00818.34
8.2.30.0050.00318.06
8.2.20.0080.00017.80
8.2.10.0050.00218.20
8.2.00.0000.00818.25
8.1.280.0140.00725.92
8.1.270.0040.00420.19
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.11
8.1.230.0070.00419.13
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0050.00317.35
8.1.180.0030.00518.10
8.1.170.0080.00018.40
8.1.160.0040.00422.07
8.1.150.0050.00318.82
8.1.140.0050.00317.51
8.1.130.0000.00817.88
8.1.120.0050.00217.42
8.1.110.0030.00517.50
8.1.100.0020.00517.40
8.1.90.0040.00417.57
8.1.80.0040.00417.53
8.1.70.0050.00317.52
8.1.60.0060.00317.55
8.1.50.0030.00617.61
8.1.40.0050.00517.57
8.1.30.0000.00817.54
8.1.20.0040.00417.64
8.1.10.0000.00817.61
8.1.00.0040.00417.64
8.0.300.0030.00518.77
8.0.290.0050.00316.88
8.0.280.0000.00818.38
8.0.270.0000.00717.33
8.0.260.0060.00017.39
8.0.250.0040.00317.03
8.0.240.0050.00317.07
8.0.230.0060.00317.07
8.0.220.0000.00717.04
8.0.210.0030.00416.93
8.0.200.0040.00417.00
8.0.190.0090.00016.96
8.0.180.0070.00016.98
8.0.170.0030.00517.05
8.0.160.0000.00716.88
8.0.150.0070.00316.97
8.0.140.0060.00317.02
8.0.130.0060.00013.48
8.0.120.0000.00817.02
8.0.110.0100.00016.95
8.0.100.0040.00417.07
8.0.90.0050.00316.89
8.0.80.0100.01016.96
8.0.70.0050.00216.86
8.0.60.0050.00217.04
8.0.50.0050.00216.90
8.0.30.0100.00917.24
8.0.20.0100.01017.40
8.0.10.0050.00317.18
8.0.00.0070.01216.95
7.4.330.0030.00315.16
7.4.320.0000.00616.46
7.4.300.0070.00016.56
7.4.290.0000.00816.66
7.4.280.0080.00016.55
7.4.270.0070.00016.58
7.4.260.0070.00016.54
7.4.250.0070.00016.43
7.4.240.0070.00016.55
7.4.230.0070.00016.54
7.4.220.0080.01416.59
7.4.210.0070.01116.60
7.4.200.0000.00716.43
7.4.160.0130.00316.89
7.4.150.0100.00717.40
7.4.140.0110.01117.86
7.4.130.0090.01416.58
7.4.120.0090.00816.63
7.4.110.0090.00916.43
7.4.100.0090.01516.72
7.4.90.0120.00616.61
7.4.80.0070.01819.39
7.4.70.0170.00316.75
7.4.60.0060.00916.43
7.4.50.0030.00516.46
7.4.40.0030.01416.70
7.4.30.0060.01316.78
7.4.10.0110.00814.94
7.4.00.0060.00815.13
7.3.330.0050.00013.46
7.3.320.0050.00013.41
7.3.310.0000.00816.57
7.3.300.0000.00716.39
7.3.290.0030.00316.50
7.3.280.0100.00916.46
7.3.270.0170.00017.40
7.3.260.0110.00716.39
7.3.250.0100.01116.52
7.3.240.0100.00716.48
7.3.230.0060.01616.39
7.3.210.0060.01316.55
7.3.200.0150.00919.39
7.3.190.0030.01716.70
7.3.180.0180.00416.44
7.3.170.0110.00616.56
7.3.160.0040.01416.63
7.3.130.0070.01114.85
7.3.120.0090.00915.06
7.3.110.0100.01014.79
7.3.100.0040.01114.76
7.3.90.0030.00614.80
7.3.80.0060.00314.73
7.3.70.0000.01414.96
7.3.60.0070.00714.57
7.3.50.0040.01114.93
7.3.40.0000.00914.94
7.3.30.0040.00814.59
7.3.20.0080.00516.79
7.3.10.0000.01316.25
7.3.00.0000.00916.30
7.2.330.0090.00916.52
7.2.320.0070.01016.77
7.2.310.0040.01216.75
7.2.300.0150.01116.84
7.2.290.0090.00916.85
7.2.260.0000.02015.02
7.2.250.0000.01915.06
7.2.240.0060.00614.94
7.2.230.0090.00614.81
7.2.220.0060.01215.03
7.2.210.0070.00714.70
7.2.200.0040.01114.76
7.2.190.0080.00815.15
7.2.180.0090.00615.06
7.2.170.0060.00315.17
7.2.160.0070.01015.24
7.2.150.0060.00616.91
7.2.140.0100.00717.05
7.2.130.0030.00616.88
7.2.120.0040.01116.89
7.2.110.0000.01216.83
7.2.100.0060.00916.48
7.2.90.0030.01016.67
7.2.80.0120.00316.77
7.2.70.0060.00617.00
7.2.60.0000.01216.57
7.2.50.0090.00916.94
7.2.40.0080.00316.72
7.2.30.0030.01216.95
7.2.20.0090.00617.05
7.2.10.0000.01116.91
7.2.00.0060.00316.55
7.1.330.0060.00615.64
7.1.320.0070.00715.82
7.1.310.0000.01315.70
7.1.300.0100.00615.34
7.1.290.0090.00615.72
7.1.280.0000.00815.94
7.1.270.0050.00515.82
7.1.260.0110.00415.80
7.1.250.0000.00915.93
7.1.240.0040.01115.80
7.1.230.0030.01316.00
7.1.220.0090.00615.72
7.1.210.0060.00615.77
7.1.200.0120.00715.60
7.1.190.0030.01015.73
7.1.180.0120.00615.79
7.1.170.0040.00715.71
7.1.160.0030.00615.42
7.1.150.0040.01115.71
7.1.140.0090.00915.94
7.1.130.0070.00715.78
7.1.120.0100.00315.76
7.1.110.0090.00615.58
7.1.100.0040.00815.54
7.1.90.0000.00915.91
7.1.80.0000.01315.80
7.1.70.0070.00616.35
7.1.60.0080.00817.67
7.1.50.0070.01216.27
7.1.40.0130.00016.00
7.1.30.0060.00915.91
7.1.20.0120.00015.43
7.1.10.0050.00515.97
7.1.00.0060.03819.11
7.0.330.0030.00715.18
7.0.320.0060.01015.46
7.0.310.0030.01415.21
7.0.300.0030.00515.40
7.0.290.0060.00915.57
7.0.280.0060.00915.43
7.0.270.0130.00315.57
7.0.260.0060.01215.43
7.0.250.0110.00315.55
7.0.240.0070.00415.28
7.0.230.0000.01115.45
7.0.220.0060.00615.44
7.0.210.0030.00615.56
7.0.200.0040.00616.23
7.0.190.0030.01015.18
7.0.180.0000.00915.45
7.0.170.0040.00715.37
7.0.160.0070.00715.38
7.0.150.0040.01415.53
7.0.140.0100.00715.16
7.0.130.0070.00715.45
7.0.120.0000.01115.36
7.0.110.0080.00415.28
7.0.100.0030.00615.48
7.0.90.0070.00715.18
7.0.80.0030.01015.21
7.0.70.0060.00615.35
7.0.60.0080.02217.68
7.0.50.0100.04016.57
7.0.40.0010.02916.91
7.0.30.0300.02016.84
7.0.20.0130.04516.78
7.0.10.0070.03016.72
7.0.00.0090.03516.82
5.6.400.0080.00814.44
5.6.390.0070.01014.79
5.6.380.0070.01014.05
5.6.370.0080.00314.54
5.6.360.0130.00014.81
5.6.350.0080.00814.26
5.6.340.0130.00714.63
5.6.330.0060.00314.86
5.6.320.0100.00714.89
5.6.310.0000.01314.31
5.6.300.0060.00614.38
5.6.290.0000.01214.55
5.6.280.0070.04017.99
5.6.270.0030.01014.55
5.6.260.0080.00414.50
5.6.250.0030.00914.42
5.6.240.0090.00314.34
5.6.230.0030.00714.42
5.6.220.0030.00714.44
5.6.210.0020.04617.59
5.6.200.0030.03216.27
5.6.190.0070.02517.50
5.6.180.0180.02817.49
5.6.170.0200.03817.55
5.6.160.0080.04117.53
5.6.150.0110.02316.20
5.6.140.0150.02216.33
5.6.130.0050.04116.39
5.6.120.0020.02617.87
5.6.110.0120.04017.74
5.6.100.0060.04417.75
5.6.90.0100.04417.84
5.6.80.0070.02517.42
5.6.70.2280.01817.45
5.6.60.0030.00914.47
5.6.50.0060.00914.52
5.6.40.0080.00414.24
5.6.30.0040.01114.74
5.6.20.0030.00614.39
5.6.10.0060.01314.43
5.6.00.0090.00614.33
5.5.380.0000.00914.41
5.5.370.0040.00714.74
5.5.360.0100.00314.42
5.5.350.0120.03417.30
5.5.340.0020.02216.05
5.5.330.0120.02117.31
5.5.320.0150.02617.46
5.5.310.0330.02317.45
5.5.300.0050.02616.23
5.5.290.0050.02216.27
5.5.280.0070.04517.75
5.5.270.0080.04417.67
5.5.260.0060.04817.59
5.5.250.0050.04517.55
5.5.240.0080.02317.46
5.5.230.0060.00914.35
5.5.220.0030.01014.60
5.5.210.0060.00914.50
5.5.200.0040.00814.07
5.5.190.0090.00314.42
5.5.180.0030.01214.53
5.5.170.0030.01014.40
5.5.160.0040.00714.11
5.5.150.0060.00914.34
5.5.140.0000.01414.58
5.5.130.0030.01013.99
5.5.120.0070.00714.20
5.5.110.0070.00314.19
5.5.100.0000.00914.55
5.5.90.0070.00314.37
5.5.80.0030.00714.29
5.5.70.0060.00314.21
5.5.60.0130.00014.20
5.5.50.0040.01214.37
5.5.40.0110.00414.37
5.5.30.0060.00814.50
5.5.20.0040.00914.39
5.5.10.0050.00514.42
5.5.00.0030.01014.44
5.4.450.0250.02015.24
5.4.440.0400.02615.42
5.4.430.0110.03015.23
5.4.420.0030.03615.42
5.4.410.0100.02815.33
5.4.400.0140.03015.20
5.4.390.0100.02514.99
5.4.380.0060.03115.04
5.4.370.0100.02915.11
5.4.360.0020.03215.10
5.4.350.0020.03415.05
5.4.340.0050.03215.19
5.4.330.0040.00711.28
5.4.320.0050.03215.23
5.4.310.0120.02815.01
5.4.300.0100.02815.10
5.4.290.0030.03115.03
5.4.280.0120.02215.18
5.4.270.0070.02815.15
5.4.260.0070.03015.13
5.4.250.0050.03015.14
5.4.240.0080.02815.20
5.4.230.0050.02915.21
5.4.220.0050.03315.19
5.4.210.0050.03015.10
5.4.200.0050.03114.04
5.4.190.0090.02715.25
5.4.180.0120.02615.21
5.4.170.0080.02915.06
5.4.160.0090.02915.13
5.4.150.0090.02815.04
5.4.140.0070.02713.87
5.4.130.0080.02713.87
5.4.120.0040.02913.71
5.4.110.0060.02514.05
5.4.100.0050.03113.77
5.4.90.0100.03013.88
5.4.80.0120.02213.93
5.4.70.0070.03013.79
5.4.60.0080.03013.71
5.4.50.0030.02813.77
5.4.40.0070.03013.78
5.4.30.0110.02413.96
5.4.20.0020.03313.73
5.4.10.0060.02813.95
5.4.00.0090.02613.74
5.3.290.0100.05714.66
5.3.280.0100.05314.83
5.3.270.0030.06014.69
5.3.260.0130.05314.54
5.3.250.0100.05314.87
5.3.240.0230.04014.83
5.3.230.0100.05314.69
5.3.220.0100.05014.76
5.3.210.0030.07714.80
5.3.200.0130.05014.74
5.3.190.0030.05714.71
5.3.180.0100.04714.72
5.3.170.0070.05314.56
5.3.160.0030.05714.72
5.3.150.0100.04714.67
5.3.140.0130.05014.80
5.3.130.0070.05714.63
5.3.120.0100.05314.56
5.3.110.0030.05714.54
5.3.100.0170.04314.10
5.3.90.0070.05714.00
5.3.80.0100.05014.25
5.3.70.0030.05314.07
5.3.60.0100.05313.99
5.3.50.0070.05314.04
5.3.40.0100.05013.89
5.3.30.0130.04313.84
5.3.20.0070.05313.73
5.3.10.0170.04013.66
5.3.00.0070.05313.79
5.2.170.0100.03711.21
5.2.160.0100.03711.30
5.2.150.0070.04311.35
5.2.140.0000.04711.16
5.2.130.0070.04011.27
5.2.120.0070.03711.34
5.2.110.0070.04011.20
5.2.100.0130.03311.25
5.2.90.0030.04711.25
5.2.80.0100.03711.24
5.2.70.0070.04311.30
5.2.60.0030.04311.08
5.2.50.0100.04011.00
5.2.40.0030.04310.99
5.2.30.0070.04011.04
5.2.20.0100.03711.05
5.2.10.0070.04010.89
5.2.00.0030.04310.87
5.1.60.0070.03310.09
5.1.50.0170.0239.98
5.1.40.0100.03010.07
5.1.30.0030.04010.39
5.1.20.0030.03710.62
5.1.10.0030.03710.09
5.1.00.0100.03710.25
5.0.50.0000.0338.53
5.0.40.0030.0308.55
5.0.30.0030.0438.27
5.0.20.0030.0308.29
5.0.10.0000.0338.19
5.0.00.0100.0408.25
4.4.90.0030.0235.86
4.4.80.0030.0205.85
4.4.70.0030.0235.94
4.4.60.0030.0205.95
4.4.50.0030.0236.00
4.4.40.0030.0375.96
4.4.30.0030.0235.88
4.4.20.0070.0176.05
4.4.10.0100.0176.06
4.4.00.0000.0375.91
4.3.110.0030.0235.79
4.3.100.0070.0205.95
4.3.90.0070.0175.75
4.3.80.0000.0375.89
4.3.70.0030.0205.88
4.3.60.0000.0235.91
4.3.50.0030.0235.85
4.3.40.0030.0335.81
4.3.30.0000.0234.55
4.3.20.0000.0274.58
4.3.10.0030.0204.46
4.3.00.0200.01315.73

preferences:
34.56 ms | 401 KiB | 5 Q