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); foreach($a as $element) { $categories[$element->category][] = $element; } /* $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.70.0100.01318.55
8.3.60.0130.00318.68
8.3.50.0080.01022.14
8.3.40.0090.00618.97
8.3.30.0090.00518.93
8.3.20.0060.00318.58
8.3.10.0030.00623.64
8.3.00.0040.00419.16
8.2.190.0080.00818.29
8.2.180.0040.01216.88
8.2.170.0110.00718.89
8.2.160.0110.00322.96
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0030.00522.25
8.2.110.0030.00620.52
8.2.100.0040.00718.22
8.2.90.0030.00519.40
8.2.80.0080.00017.97
8.2.70.0030.00517.50
8.2.60.0030.00518.03
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0060.00318.14
8.2.20.0060.00317.85
8.2.10.0000.00818.13
8.2.00.0070.00018.17
8.1.280.0070.01425.92
8.1.270.0090.00920.30
8.1.260.0070.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00322.05
8.1.230.0050.00519.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.47
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0000.00918.46
8.1.160.0040.00422.04
8.1.150.0050.00218.79
8.1.140.0040.00417.39
8.1.130.0070.00017.82
8.1.120.0000.00717.43
8.1.110.0000.00717.54
8.1.100.0000.00717.36
8.1.90.0050.00217.49
8.1.80.0040.00417.32
8.1.70.0000.00717.50
8.1.60.0050.00317.55
8.1.50.0040.00417.46
8.1.40.0030.00517.54
8.1.30.0040.00417.69
8.1.20.0000.00817.69
8.1.10.0040.00417.47
8.1.00.0040.00417.57
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0040.00418.47
8.0.270.0070.00017.20
8.0.260.0030.00317.30
8.0.250.0070.00017.04
8.0.240.0030.00317.04
8.0.230.0030.00617.06
8.0.220.0000.00716.98
8.0.210.0070.00016.84
8.0.200.0000.00716.99
8.0.190.0040.00417.02
8.0.180.0000.00817.00
8.0.170.0040.00416.96
8.0.160.0000.00716.87
8.0.150.0000.00716.96
8.0.140.0000.00816.82
8.0.130.0000.00613.43
8.0.120.0040.00416.83
8.0.110.0000.00816.88
8.0.100.0000.00717.01
8.0.90.0040.00416.80
8.0.80.0120.00316.96
8.0.70.0050.00317.00
8.0.60.0040.00416.96
8.0.50.0040.00416.89
8.0.30.0120.00817.09
8.0.20.0180.00517.40
8.0.10.0000.00717.15
8.0.00.0080.01216.73
7.4.330.0000.00515.10
7.4.320.0030.00316.59
7.4.300.0030.00316.56
7.4.290.0000.00716.53
7.4.280.0050.00216.52
7.4.270.0000.00716.55
7.4.260.0040.00416.48
7.4.250.0000.00716.45
7.4.240.0020.00516.53
7.4.230.0030.00316.74
7.4.220.0200.00316.45
7.4.210.0050.01316.56
7.4.200.0040.00416.32
7.4.160.0170.00016.52
7.4.150.0070.01017.40
7.4.140.0100.01017.86
7.4.130.0060.01416.54
7.4.120.0100.00716.60
7.4.110.0120.00616.56
7.4.100.0180.00416.50
7.4.90.0030.01316.69
7.4.80.0090.00919.39
7.4.70.0160.00016.57
7.4.60.0090.00616.63
7.4.50.0050.00316.25
7.4.40.0070.01016.65
7.4.30.0110.01116.48
7.4.10.0060.00615.20
7.4.00.0040.01414.94
7.3.330.0000.00513.24
7.3.320.0030.00313.45
7.3.310.0070.00016.27
7.3.300.0030.00416.32
7.3.290.0070.00016.50
7.3.280.0100.01116.47
7.3.270.0130.00917.40
7.3.260.0100.00716.40
7.3.250.0090.00816.56
7.3.240.0100.00716.42
7.3.230.0090.00916.43
7.3.210.0150.00316.57
7.3.200.0130.00319.39
7.3.190.0030.01316.55
7.3.180.0300.00316.40
7.3.170.0050.01116.72
7.3.160.0100.00616.54
7.3.130.0100.01014.74
7.3.120.0030.01415.07
7.3.110.0060.01314.90
7.3.100.0070.00715.10
7.3.90.0000.01414.86
7.3.80.0040.00815.16
7.3.70.0090.00614.70
7.3.60.0000.00914.97
7.3.50.0030.00814.89
7.3.40.0060.00614.62
7.3.30.0100.00314.81
7.3.20.0100.00316.68
7.3.10.0070.00716.92
7.3.00.0000.01316.80
7.2.330.0120.00616.59
7.2.320.0060.01016.80
7.2.310.0110.00816.77
7.2.300.0080.01116.77
7.2.290.0060.01216.43
7.2.260.0100.01015.20
7.2.250.0060.01315.23
7.2.240.0070.00715.23
7.2.230.0040.01515.30
7.2.220.0030.01015.13
7.2.210.0030.00714.92
7.2.200.0030.01415.11
7.2.190.0080.00814.90
7.2.180.0000.01815.13
7.2.170.0100.00615.13
7.2.160.0000.01714.81
7.2.150.0040.00716.91
7.2.140.0060.00317.02
7.2.130.0060.00917.17
7.2.120.0040.01217.11
7.2.110.0060.00916.95
7.2.100.0000.00916.99
7.2.90.0070.00716.74
7.2.80.0070.00717.19
7.2.70.0070.00717.16
7.2.60.0020.01317.04
7.2.50.0070.00716.95
7.2.40.0040.00817.11
7.2.30.0060.00617.06
7.2.20.0000.01116.96
7.2.10.0030.01016.95
7.2.00.0060.00318.27
7.1.330.0120.00015.82
7.1.320.0110.00415.79
7.1.310.0070.00715.79
7.1.300.0060.00616.00
7.1.290.0090.00415.94
7.1.280.0040.01115.86
7.1.270.0060.00315.68
7.1.260.0040.01115.81
7.1.250.0030.01015.59
7.1.240.0030.00715.75
7.1.230.0070.00715.94
7.1.220.0000.01415.91
7.1.210.0000.01015.94
7.1.200.0000.01315.82
7.1.190.0000.01615.84
7.1.180.0000.01115.56
7.1.170.0090.00015.83
7.1.160.0040.00715.51
7.1.150.0040.01115.55
7.1.140.0000.01315.75
7.1.130.0120.00315.71
7.1.120.0040.01115.79
7.1.110.0060.00916.00
7.1.100.0020.00916.99
7.1.90.0030.00515.51
7.1.80.0030.00915.88
7.1.70.0070.00516.60
7.1.60.0080.01117.52
7.1.50.0050.01016.37
7.1.40.0040.00815.79
7.1.30.0030.01015.95
7.1.20.0070.00715.87
7.1.10.0080.00415.82
7.1.00.0030.04119.09
7.0.330.0120.00315.52
7.0.320.0040.00915.42
7.0.310.0040.01115.27
7.0.300.0080.00415.43
7.0.290.0080.00315.50
7.0.280.0050.00315.29
7.0.270.0000.01115.18
7.0.260.0000.01515.42
7.0.250.0090.00615.20
7.0.240.0050.00315.11
7.0.230.0040.00715.36
7.0.220.0060.00615.66
7.0.210.0030.00915.14
7.0.200.0030.00816.11
7.0.190.0000.01215.55
7.0.180.0000.00915.46
7.0.170.0030.01315.48
7.0.160.0100.00015.52
7.0.150.0040.01115.55
7.0.140.0090.00015.36
7.0.130.0130.00315.53
7.0.120.0070.01015.25
7.0.110.0040.00715.39
7.0.100.0090.00315.44
7.0.90.0060.00315.42
7.0.80.0070.00415.09
7.0.70.0040.01115.55
7.0.60.0060.02117.66
7.0.50.0060.04316.74
7.0.40.0070.04816.82
7.0.30.0150.02316.69
7.0.20.0180.03216.88
7.0.10.0050.02416.76
7.0.00.0070.04016.87
5.6.400.0040.00814.30
5.6.390.0060.00314.64
5.6.380.0060.00914.51
5.6.370.0140.00314.45
5.6.360.0000.01014.89
5.6.350.0070.00314.67
5.6.340.0100.00014.77
5.6.330.0110.00414.28
5.6.320.0030.01214.35
5.6.310.0000.01414.54
5.6.300.0000.01414.77
5.6.290.0000.01114.48
5.6.280.0080.03717.49
5.6.270.0030.01214.77
5.6.260.0060.00614.42
5.6.250.0080.00814.15
5.6.240.0070.00714.40
5.6.230.0040.01114.71
5.6.220.0040.00814.79
5.6.210.0040.02917.55
5.6.200.0000.04116.32
5.6.190.0100.03517.53
5.6.180.0190.03817.40
5.6.170.0180.04317.46
5.6.160.0050.02217.48
5.6.150.0060.02416.42
5.6.140.0080.04316.39
5.6.130.0070.04616.31
5.6.120.0120.04017.65
5.6.110.0030.03017.90
5.6.100.0050.03617.85
5.6.90.0050.04217.97
5.6.80.0100.03717.52
5.6.70.0000.01514.57
5.6.60.0120.00314.59
5.6.50.0080.00414.50
5.6.40.0040.00814.41
5.6.30.0030.00614.37
5.6.20.0060.00314.61
5.6.10.0100.00314.41
5.6.00.0030.00614.52
5.5.380.0070.00714.57
5.5.370.0030.01314.67
5.5.360.0070.00714.46
5.5.350.0050.04017.41
5.5.340.0040.02616.35
5.5.330.0100.04717.26
5.5.320.0220.04517.40
5.5.310.0150.03817.53
5.5.300.0100.04016.39
5.5.290.0020.03416.05
5.5.280.0080.03817.72
5.5.270.0100.04817.73
5.5.260.0030.04417.49
5.5.250.0080.03117.44
5.5.240.0050.01717.37
5.5.230.0090.00614.09
5.5.220.0060.00914.40
5.5.210.0110.00314.40
5.5.200.0040.01114.36
5.5.190.0120.00314.78
5.5.180.0080.00314.20
5.5.170.0070.00414.38
5.5.160.0080.00314.25
5.5.150.0040.01114.69
5.5.140.0040.01114.45
5.5.130.0130.00314.28
5.5.120.0110.00414.49
5.5.110.0060.00614.50
5.5.100.0070.00414.21
5.5.90.0060.00914.43
5.5.80.0050.00514.42
5.5.70.0080.00414.31
5.5.60.0050.00314.60
5.5.50.0100.00314.29
5.5.40.0060.00314.57
5.5.30.0080.00314.35
5.5.20.0030.00714.65
5.5.10.0100.00314.39
5.5.00.0060.00614.47
5.4.450.0220.02415.24
5.4.440.0300.02815.42
5.4.430.0050.03015.34
5.4.420.0110.02515.45
5.4.410.0100.02715.17
5.4.400.0050.03315.30
5.4.390.0080.03015.12
5.4.380.0030.03515.06
5.4.370.0090.02715.11
5.4.360.0080.02715.11
5.4.350.0080.03115.02
5.4.340.0060.02915.05
5.4.330.0070.00711.03
5.4.320.0060.02815.09
5.4.310.0060.03214.96
5.4.300.0030.03214.99
5.4.290.0050.03015.04
5.4.280.0070.02815.11
5.4.270.0050.02814.98
5.4.260.0080.02915.18
5.4.250.0030.03215.01
5.4.240.0090.02815.01
5.4.230.0130.02714.96
5.4.220.0020.03415.21
5.4.210.0000.03915.30
5.4.200.0050.03013.90
5.4.190.0070.03115.05
5.4.180.0050.03214.96
5.4.170.0080.02815.13
5.4.160.0220.01815.08
5.4.150.0020.03415.24
5.4.140.0140.02213.85
5.4.130.0050.02713.76
5.4.120.0110.02213.70
5.4.110.0060.02813.92
5.4.100.0030.03313.74
5.4.90.0020.03413.82
5.4.80.0100.02513.77
5.4.70.0050.02913.90
5.4.60.0080.03113.90
5.4.50.0060.03013.95
5.4.40.0050.02913.71
5.4.30.0100.02713.94
5.4.20.0050.03313.76
5.4.10.0040.03013.81
5.4.00.0050.02713.36
5.3.290.0070.05714.91
5.3.280.0030.06014.68
5.3.270.0270.05314.75
5.3.260.0170.05014.62
5.3.250.0100.07014.59
5.3.240.0130.07014.69
5.3.230.0030.06014.75
5.3.220.0000.06314.73
5.3.210.0100.05314.84
5.3.200.0070.05314.57
5.3.190.0130.05014.76
5.3.180.0070.06014.79
5.3.170.0100.05314.70
5.3.160.0170.04314.72
5.3.150.0170.04314.56
5.3.140.0100.05314.60
5.3.130.0070.05314.78
5.3.120.0130.05314.63
5.3.110.0100.05314.56
5.3.100.0130.04314.25
5.3.90.0100.05014.13
5.3.80.0130.04714.08
5.3.70.0070.05014.11
5.3.60.0100.05014.07
5.3.50.0100.05014.09
5.3.40.0130.04713.99
5.3.30.0130.04713.89
5.3.20.0130.04313.88
5.3.10.0130.04313.85
5.3.00.0070.05013.73
5.2.170.0070.04011.20
5.2.160.0030.04311.14
5.2.150.0130.03311.20
5.2.140.0100.05311.21
5.2.130.0070.04011.20
5.2.120.0100.03311.17
5.2.110.0100.03711.30
5.2.100.0130.03011.20
5.2.90.0100.03711.12
5.2.80.0030.04711.17
5.2.70.0030.04711.09
5.2.60.0000.04711.08
5.2.50.0030.04311.01
5.2.40.0030.04311.15
5.2.30.0070.04011.02
5.2.20.0030.04310.95
5.2.10.0000.04310.93
5.2.00.0000.04710.95
5.1.60.0030.03310.02
5.1.50.0070.03310.25
5.1.40.0030.03710.00
5.1.30.0030.04010.41
5.1.20.0170.03710.61
5.1.10.0030.04010.22
5.1.00.0000.04010.01
5.0.50.0070.0278.58
5.0.40.0070.0238.43
5.0.30.0070.0408.43
5.0.20.0100.0208.29
5.0.10.0070.0278.15
5.0.00.0030.0438.36
4.4.90.0030.0206.05
4.4.80.0000.0236.02
4.4.70.0000.0235.98
4.4.60.0030.0205.88
4.4.50.0070.0175.96
4.4.40.0000.0376.02
4.4.30.0030.0206.01
4.4.20.0100.0176.07
4.4.10.0030.0236.06
4.4.00.0000.0376.05
4.3.110.0030.0235.80
4.3.100.0100.0135.97
4.3.90.0030.0205.75
4.3.80.0030.0335.79
4.3.70.0070.0205.77
4.3.60.0070.0175.76
4.3.50.0030.0235.91
4.3.40.0000.0375.73
4.3.30.0070.0204.52
4.3.20.0000.0234.58
4.3.10.0000.0234.55
4.3.00.0230.01315.73

preferences:
49.88 ms | 401 KiB | 5 Q