3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isEmptyArray($item) { if (is_array($item)) { return array_filter($item, 'isEmptyArray'); } if (!empty($item) || $item === "0") { return true; } return false; } function removeEmptyArrays($array) { $filteredArray = array_filter($array, 'isEmptyArray'); return $filteredArray; } function isMultiDimensional($array) { if(is_array($array)) { foreach ($array as $key=>$value){ if(is_array($value)){ return true; } } } return false; } $options_array = array("acct"=>array("acct_row"=>array("billing_group"=> array ("billing_group_row"=> array ('0' => array("billing_group_name"=>"", "billing_group_description"=> "", "list_start_master_file"=> "0" )))))); $options = array(); $apiLiveOptions = array(); foreach ($options_array AS $key => $value) { if (is_array($value)) { if (!empty($value[$key])) { $options[$key] = $value; $apiLiveOptions[$key] = $value; } else { $array = array(); $apiLiveArray = array(); foreach ($value as $k => $v) { if(!empty($v[$k])) { $array[] = $value[$k]; $apiLiveArray[] = $value[$k]; $options[$key] = $array; } else { $newArray = array_filter($v, 'removeEmptyArrays'); $apiLiveArray[$k] = $newArray; var_dump($options); foreach($newArray as $row => $column) { if(is_array($column)) { var_dump($column); foreach($column as $r=>$c) { $options[$row][$r]=$c; } } else { $array[$k]=$column; $options[$row] = $array; } } } } $apiLiveOptions[$key] = $apiLiveArray; } } else { $options[$key] = $value; $apiLiveOptions[$key] = $value; } }; ?>

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.0180.00316.50
8.3.50.0160.00621.27
8.3.40.0150.00018.84
8.3.30.0110.00718.70
8.3.20.0050.00220.16
8.3.10.0080.00023.68
8.3.00.0030.00623.70
8.2.180.0090.00916.38
8.2.170.0040.01118.80
8.2.160.0130.00322.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0080.00019.83
8.2.120.0070.00026.35
8.2.110.0100.00022.17
8.2.100.0040.00818.05
8.2.90.0000.00819.34
8.2.80.0050.00317.97
8.2.70.0060.00317.48
8.2.60.0050.00318.05
8.2.50.0080.00018.07
8.2.40.0000.00720.59
8.2.30.0040.00419.57
8.2.20.0040.00417.75
8.2.10.0000.00718.13
8.2.00.0040.00418.18
8.1.280.0050.01025.92
8.1.270.0110.00022.20
8.1.260.0100.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00623.85
8.1.230.0080.00419.21
8.1.220.0040.00417.79
8.1.210.0030.00618.77
8.1.200.0060.00317.38
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0000.00820.79
8.1.150.0040.00418.88
8.1.140.0040.00419.66
8.1.130.0000.00717.68
8.1.120.0000.00817.49
8.1.110.0050.00217.36
8.1.100.0040.00417.46
8.1.90.0000.00717.45
8.1.80.0070.00017.48
8.1.70.0070.00017.53
8.1.60.0090.00017.49
8.1.50.0030.00617.56
8.1.40.0030.00617.41
8.1.30.0050.00317.69
8.1.20.0050.00217.61
8.1.10.0040.00417.63
8.1.00.0060.00317.52
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0040.00418.33
8.0.270.0000.00817.18
8.0.260.0070.00317.22
8.0.250.0030.00316.89
8.0.240.0030.00516.96
8.0.230.0070.00016.99
8.0.220.0000.00716.87
8.0.210.0000.00816.93
8.0.200.0070.00016.98
8.0.190.0060.00316.93
8.0.180.0030.00616.96
8.0.170.0040.00416.90
8.0.160.0000.00716.94
8.0.150.0040.00416.88
8.0.140.0070.00016.84
8.0.130.0000.00613.31
8.0.120.0090.00016.88
8.0.110.0000.00716.82
8.0.100.0040.00316.68
8.0.90.0040.00416.88
8.0.80.0100.00616.95
8.0.70.0000.00816.88
8.0.60.0080.00016.81
8.0.50.0000.00816.76
8.0.30.0100.00816.83
8.0.20.0100.01217.40
8.0.10.0040.00417.10
8.0.00.0100.00916.78
7.4.330.0050.00016.70
7.4.320.0000.00616.61
7.4.300.0000.00616.53
7.4.290.0040.00416.62
7.4.280.0000.01016.53
7.4.270.0050.00216.61
7.4.260.0000.00716.45
7.4.250.0030.00416.51
7.4.240.0010.00716.56
7.4.230.0000.00716.70
7.4.220.0080.01016.57
7.4.210.0080.01016.52
7.4.200.0070.00016.70
7.4.160.0130.00316.46
7.4.150.0130.00617.40
7.4.140.0200.00717.86
7.4.130.0100.00716.55
7.4.120.0070.01016.34
7.4.110.0150.00316.48
7.4.100.0080.01116.52
7.4.90.0110.00816.67
7.4.80.0090.00919.39
7.4.70.0100.00716.59
7.4.60.0100.00616.57
7.4.50.0040.01116.53
7.4.40.0150.00616.41
7.4.30.0070.01416.52
7.4.00.0070.00715.27
7.3.330.0000.00613.32
7.3.320.0020.00213.37
7.3.310.0000.00716.23
7.3.300.0030.00316.27
7.3.290.0000.00716.34
7.3.280.0090.01216.37
7.3.270.0130.00917.40
7.3.260.0110.00816.46
7.3.250.0100.00716.51
7.3.240.0080.01516.38
7.3.230.0150.00316.58
7.3.210.0130.00516.29
7.3.200.0030.01319.39
7.3.190.0100.00716.35
7.3.180.0130.00316.44
7.3.170.0130.00316.37
7.3.160.0160.00616.34
7.3.120.0000.01515.00
7.3.110.0090.00614.86
7.3.100.0080.00414.81
7.3.90.0030.01314.67
7.3.80.0000.01314.84
7.3.70.0000.00915.02
7.3.60.0000.01015.05
7.3.50.0060.00914.93
7.3.40.0040.00714.94
7.3.30.0080.00814.85
7.3.20.0070.00316.48
7.3.10.0020.01116.54
7.3.00.0060.00816.69
7.2.330.0150.00316.72
7.2.320.0070.01016.81
7.2.310.0080.00916.62
7.2.300.0000.01616.76
7.2.290.0000.01716.80
7.2.240.0000.01115.15
7.2.230.0030.01415.19
7.2.220.0070.00415.08
7.2.210.0030.01415.10
7.2.200.0000.01415.18
7.2.190.0100.00015.05
7.2.180.0030.00915.25
7.2.170.0030.00615.16
7.2.160.0000.01215.28
7.2.150.0070.01116.70
7.2.140.0070.00717.13
7.2.130.0060.00916.94
7.2.120.0080.00816.94
7.2.110.0080.00717.09
7.2.100.0040.00917.09
7.2.90.0030.01216.95
7.2.80.0100.00416.96
7.2.70.0080.00616.96
7.2.60.0030.00916.79
7.2.50.0090.00816.90
7.2.40.0090.00816.76
7.2.30.0070.01016.88
7.2.20.0020.01216.88
7.2.10.0070.00716.88
7.2.00.0030.01017.67
7.1.330.0000.01015.79
7.1.320.0000.01415.78
7.1.310.0080.00415.62
7.1.300.0080.00415.59
7.1.290.0030.01015.87
7.1.280.0090.00615.75
7.1.270.0090.00415.69
7.1.260.0100.00015.98
7.1.250.0060.00615.74
7.1.240.0030.00715.98
7.1.230.0090.00015.50
7.1.220.0070.00315.54
7.1.210.0070.00715.43
7.1.200.0030.01015.71
7.1.190.0040.00815.96
7.1.180.0060.00615.85
7.1.170.0120.00315.68
7.1.160.0120.00315.75
7.1.150.0000.00915.91
7.1.140.0110.00315.96
7.1.130.0030.00515.96
7.1.120.0000.01715.90
7.1.110.0040.00415.68
7.1.100.0070.00416.85
7.1.90.0100.00315.96
7.1.80.0070.00715.84
7.1.70.0050.00416.60
7.1.60.0050.01417.50
7.1.50.0090.00616.32
7.1.40.0000.00815.86
7.1.30.0030.00915.81
7.1.20.0000.01515.80
7.1.10.0000.01015.56
7.1.00.0040.04319.05
7.0.330.0070.00715.11
7.0.320.0030.00815.29
7.0.310.0060.00615.47
7.0.300.0000.01115.29
7.0.290.0060.00615.20
7.0.280.0070.00715.32
7.0.270.0090.00315.13
7.0.260.0080.00515.03
7.0.250.0000.01415.22
7.0.240.0070.00315.31
7.0.230.0040.01115.46
7.0.220.0030.00915.25
7.0.210.0070.00715.25
7.0.200.0040.00616.09
7.0.190.0090.00315.32
7.0.180.0060.00615.24
7.0.170.0060.00615.40
7.0.160.0040.01115.54
7.0.150.0130.00015.39
7.0.140.0060.00915.41
7.0.130.0060.00915.28
7.0.120.0030.01315.48
7.0.110.0040.00815.20
7.0.100.0000.01115.25
7.0.90.0110.00015.23
7.0.80.0060.00915.04
7.0.70.0090.00015.22
7.0.60.0070.04918.40
7.0.50.0060.04016.54
7.0.40.0070.02416.78
7.0.30.0150.02816.81
7.0.20.0150.03316.93
7.0.10.0120.03416.77
7.0.00.0120.01816.79
5.6.380.0000.01114.55
5.6.370.0050.00514.27
5.6.360.0030.00714.57
5.6.350.0110.00413.93
5.6.340.0080.00314.32
5.6.330.0060.00314.50
5.6.320.0070.00714.49
5.6.310.0030.00614.68
5.6.300.0030.01414.80
5.6.290.0070.00314.34
5.6.280.0020.02217.65
5.6.270.0060.00914.36
5.6.260.0080.00314.37
5.6.250.0070.00714.44
5.6.240.0060.00614.61
5.6.230.0030.00614.51
5.6.220.0040.01014.33
5.6.210.0070.04417.57
5.6.200.0050.02716.22
5.6.190.0080.02817.43
5.6.180.0200.03917.38
5.6.170.0230.04017.43
5.6.160.0030.04017.46
5.6.150.0080.04016.13
5.6.140.0030.04316.23
5.6.130.0070.04016.32
5.6.120.0090.04217.74
5.6.110.0100.04217.72
5.6.100.0100.04317.67
5.6.90.0030.04817.72
5.6.80.0080.04217.39
5.6.70.0030.01014.38
5.6.60.0100.00314.30
5.6.50.0060.00914.41
5.6.40.0040.00914.41
5.6.30.0090.00014.38
5.6.20.0100.00714.32
5.6.10.0090.00614.16
5.6.00.0070.00713.96
5.5.380.0090.00311.45
5.5.370.0000.01011.20
5.5.360.0040.00710.85
5.5.350.0050.04215.83
5.5.340.0040.02714.44
5.5.330.0070.04315.90
5.5.320.0350.03315.81
5.5.310.0100.02415.91
5.5.300.0080.04014.66
5.5.290.0040.02414.67
5.5.280.0060.02615.93
5.5.270.0070.04216.06
5.5.260.0060.03015.86
5.5.250.0120.03915.98
5.5.240.0070.04415.58
5.5.230.0000.00611.25
5.5.220.0080.00311.16
5.5.210.0030.00711.36
5.5.200.0070.00011.13
5.5.190.0000.00611.21
5.5.180.0080.00310.94
5.5.170.0000.01111.00
5.5.160.0080.00511.11
5.5.150.0060.00311.11
5.5.140.0040.00710.71
5.5.130.0090.00311.02
5.5.120.0030.00311.03
5.5.110.0120.00311.32
5.5.100.0100.00311.36
5.5.90.0000.00611.09
5.5.80.0000.01111.29
5.5.70.0060.00611.10
5.5.60.0060.00310.97
5.5.50.0070.00711.05
5.5.40.0000.00611.23
5.5.30.0090.00011.11
5.5.20.0040.00711.14
5.5.10.0060.00611.10
5.5.00.0060.00010.99

preferences:
49.79 ms | 401 KiB | 5 Q