3v4l.org

run code in 300+ PHP versions simultaneously
<?php function printAll(&$a) { if (!is_array($a)) { //echo $a . "<br/>"; return; } foreach($a as $b =>$c) { if(is_array($c)) { if($a =="nutts"){$a["test"] = array();} // trying to loop though multidimensional array and add array echo "here is a step $b<br/>"; printAll($c); } // end if array } // end foreach //printAll($a); }// end printAll $array = array('hello', "natts"=>array('world', '!', array('whats'), 'up'), array('?')); printAll($aarray); var_dump($array);

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.00318.43
8.3.50.0040.01118.04
8.3.40.0140.00418.57
8.3.30.0040.01118.55
8.3.20.0070.00020.30
8.3.10.0110.00019.18
8.3.00.0050.00319.79
8.2.180.0120.00316.36
8.2.170.0130.00922.96
8.2.160.0110.00419.23
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00719.82
8.2.120.0080.00026.35
8.2.110.0060.00319.39
8.2.100.0080.00417.91
8.2.90.0050.00319.05
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0060.00318.03
8.2.50.0000.00818.10
8.2.40.0040.00422.33
8.2.30.0040.00419.17
8.2.20.0040.00418.07
8.2.10.0000.00718.13
8.2.00.0000.00717.97
8.1.280.0110.00725.92
8.1.270.0040.00421.89
8.1.260.0070.00026.35
8.1.250.0000.00928.09
8.1.240.0050.00519.38
8.1.230.0040.00819.22
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0000.00817.22
8.1.180.0000.00718.10
8.1.170.0040.00418.59
8.1.160.0000.00819.07
8.1.150.0070.00018.86
8.1.140.0080.00019.64
8.1.130.0000.00719.00
8.1.120.0040.00417.39
8.1.110.0040.00417.44
8.1.100.0000.00817.38
8.1.90.0080.00017.43
8.1.80.0030.00317.38
8.1.70.0030.00617.50
8.1.60.0090.00017.51
8.1.50.0040.00417.49
8.1.40.0000.00717.36
8.1.30.0060.00317.57
8.1.20.0080.00017.67
8.1.10.0080.00017.40
8.1.00.0050.00317.47
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0000.00718.37
8.0.270.0030.00317.31
8.0.260.0030.00320.66
8.0.250.0000.00616.87
8.0.240.0070.00017.00
8.0.230.0000.00716.83
8.0.220.0030.00316.80
8.0.210.0000.00716.79
8.0.200.0030.00316.97
8.0.190.0100.00316.95
8.0.180.0000.00716.92
8.0.170.0070.00316.92
8.0.160.0000.00716.88
8.0.150.0040.00416.80
8.0.140.0040.00416.82
8.0.130.0030.00613.35
8.0.120.0080.00016.89
8.0.110.0040.00416.78
8.0.100.0000.00816.70
8.0.90.0040.00416.76
8.0.80.0130.00316.93
8.0.70.0040.00416.87
8.0.60.0050.00316.92
8.0.50.0050.00216.87
8.0.30.0100.00817.05
8.0.20.0100.01017.40
8.0.10.0080.00016.90
8.0.00.0120.00616.87
7.4.330.0000.00615.55
7.4.320.0000.00616.68
7.4.300.0000.00616.58
7.4.290.0000.00716.50
7.4.280.0000.00716.64
7.4.270.0000.00716.54
7.4.260.0000.00716.49
7.4.250.0030.00516.55
7.4.240.0070.00016.59
7.4.230.0000.00716.66
7.4.220.0100.01016.47
7.4.210.0070.01416.63
7.4.200.0030.00316.69
7.4.160.0090.00816.46
7.4.150.0080.01117.40
7.4.140.0090.00917.86
7.4.130.0100.00916.61
7.4.120.0110.00916.43
7.4.110.0140.00416.65
7.4.100.0110.00516.48
7.4.90.0140.00516.32
7.4.80.0140.01019.39
7.4.70.0040.01816.41
7.4.60.0130.00316.55
7.4.50.0030.01216.61
7.4.40.0090.00816.51
7.4.30.0100.00716.62
7.4.10.0060.01314.94
7.4.00.0090.00815.17
7.3.330.0000.00713.25
7.3.320.0000.00513.03
7.3.310.0050.00216.26
7.3.300.0070.00016.22
7.3.290.0070.00716.26
7.3.280.0110.00616.23
7.3.270.0090.00917.40
7.3.260.0160.02116.26
7.3.250.0130.00616.25
7.3.240.0090.01016.44
7.3.230.0110.00716.22
7.3.210.0130.00316.24
7.3.200.0120.00416.61
7.3.190.0040.01216.44
7.3.180.0100.00716.45
7.3.170.0160.00516.33
7.3.160.0060.00916.61
7.3.130.0100.00714.78
7.3.120.0160.00014.95
7.3.110.0060.01214.93
7.3.100.0070.00714.80
7.3.90.0060.00914.93
7.3.80.0030.00714.72
7.3.70.0110.00014.95
7.3.60.0030.00714.73
7.3.50.0030.01014.74
7.3.40.0070.01114.55
7.3.30.0030.01314.79
7.3.20.0000.01416.58
7.3.10.0070.00716.71
7.3.00.0090.00916.55
7.2.330.0160.00316.23
7.2.320.0100.01016.70
7.2.310.0120.00616.63
7.2.300.0100.00716.66
7.2.290.0070.01016.59
7.2.260.0110.00715.06
7.2.250.0070.01014.88
7.2.240.0060.00915.08
7.2.230.0000.01415.18
7.2.220.0000.01115.05
7.2.210.0040.00714.91
7.2.200.0040.01115.02
7.2.190.0100.00015.00
7.2.180.0120.00314.92
7.2.170.0130.00314.90
7.2.160.0130.00615.17
7.2.150.0040.01116.63
7.2.140.0060.01016.73
7.2.130.0030.01016.83
7.2.120.0060.00916.86
7.2.110.0080.00416.83
7.2.100.0040.01117.01
7.2.90.0110.00016.84
7.2.80.0070.01316.73
7.2.70.0140.00016.77
7.2.60.0060.00616.91
7.2.50.0060.00616.73
7.2.40.0060.01016.82
7.2.30.0060.01016.80
7.2.20.0110.00716.91
7.2.10.0030.01016.80
7.2.00.0030.01016.63
7.1.330.0080.00015.47
7.1.320.0030.00615.76
7.1.310.0100.00315.75
7.1.300.0070.01015.76
7.1.290.0090.00615.61
7.1.280.0090.00915.97
7.1.270.0130.00315.70
7.1.260.0040.00815.74
7.1.250.0120.00615.98
7.1.240.0030.00815.58
7.1.230.0040.01115.74
7.1.220.0060.00915.51
7.1.210.0060.00915.86
7.1.200.0000.01115.73
7.1.190.0060.00315.73
7.1.180.0090.00615.76
7.1.170.0060.00915.89
7.1.160.0060.00315.77
7.1.150.0060.00615.80
7.1.140.0070.00715.84
7.1.130.0000.01215.89
7.1.120.0110.00415.94
7.1.110.0040.01115.79
7.1.100.0030.00615.90
7.1.90.0080.00815.71
7.1.80.0040.00815.89
7.1.70.0330.01115.57
7.1.60.0430.01024.42
7.1.50.0360.01424.38
7.1.40.0420.01324.28
7.1.30.0520.00624.33
7.1.20.0380.01224.13
7.1.10.0370.01315.19
7.1.00.0350.00915.23
7.0.330.0090.00915.38
7.0.320.0040.00715.38
7.0.310.0040.01115.27
7.0.300.0030.00615.14
7.0.290.0100.00315.34
7.0.280.0000.00915.48
7.0.270.0070.00715.30
7.0.260.0070.00715.16
7.0.250.0070.00715.35
7.0.240.0030.00515.25
7.0.230.0100.00315.40
7.0.220.0110.00415.34
7.0.210.0060.01015.44
7.0.200.0400.00815.15
7.0.190.0370.01015.16
7.0.180.0370.01214.88
7.0.170.0500.00614.86
7.0.160.0330.01514.90
7.0.150.0360.00814.97
7.0.140.0400.00615.03
7.0.130.0370.00815.12
7.0.120.0230.01115.08
7.0.110.0400.01115.12
7.0.100.0270.00815.05
7.0.90.0380.00814.76
7.0.80.0280.00815.06
7.0.70.0360.01014.87
7.0.60.0340.00714.90
7.0.50.0270.00714.91
7.0.40.0310.00914.06
7.0.30.0260.00614.13
7.0.20.0320.01113.96
7.0.10.0310.01014.05
7.0.00.0340.01114.01
5.6.400.0040.01114.20
5.6.390.0060.01214.43
5.6.380.0120.00814.15
5.6.370.0120.00314.44
5.6.360.0070.01013.91
5.6.350.0030.00614.61
5.6.340.0040.01214.48
5.6.330.0060.00314.50
5.6.320.0040.00414.24
5.6.310.0090.00614.36
5.6.300.0030.00714.23
5.6.290.0030.01114.21
5.6.280.0040.01414.43
5.6.270.0080.00814.12
5.6.260.0040.00814.36
5.6.250.0070.00714.29
5.6.240.0030.00714.10
5.6.230.0030.00914.23
5.6.220.0060.00614.05
5.6.210.0080.00314.17
5.6.200.0070.01014.23
5.6.190.0000.01314.29
5.6.180.0060.00614.28
5.6.170.0100.00014.15
5.6.160.0060.01014.50
5.6.150.0060.00614.38
5.6.140.0060.00314.02
5.6.130.0030.00614.23
5.6.120.0040.00414.48
5.6.110.0030.01014.29
5.6.100.0060.00613.98
5.6.90.0070.00414.10
5.6.80.0060.00614.04
5.6.70.0040.01114.07
5.6.60.0090.00514.11
5.6.50.0000.00814.19
5.6.40.0100.00314.07
5.6.30.0030.01013.94
5.6.20.0100.00714.23
5.6.10.0040.00813.93
5.6.00.0030.00714.10

preferences:
61.9 ms | 400 KiB | 5 Q