3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_print($item, $key) { echo "$key holds $item\n"; } function recursion($array) { echo "==============="; if(count($array) == 0) return; foreach (new RecursiveIteratorIterator( new RecursiveArrayIterator($information), RecursiveIteratorIterator::CATCH_GET_CHILD) as $key => $value) { if(is_array($value)) recursion($value); else echo 'My node ' . $key . ' with value ' . $value . PHP_EOL; } } $information = array("login" => "someUsername", "password" => "somePassword", "card_pin"=>"card_1234", "pin"=>"pin_356", "iin" => "iin_123", "shipping" => array("telephone" => "telephone_998"), "cardnumber" => "card_number_876", "customer_id" => "customer_654"); $list = "login,customer_id"; //array_walk_recursive($information, 'test_print'); recursion($information);

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.0040.01116.61
8.3.50.0130.00121.99
8.3.40.0140.00018.68
8.3.30.0070.00718.83
8.3.20.0040.00420.18
8.3.10.0080.00023.70
8.3.00.0040.00419.49
8.2.180.0110.00718.54
8.2.170.0130.00722.96
8.2.160.0130.00022.13
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00717.50
8.2.120.0040.00426.35
8.2.110.0090.00020.35
8.2.100.0090.00318.04
8.2.90.0040.00419.26
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0000.00917.91
8.2.50.0030.00618.07
8.2.40.0040.00419.39
8.2.30.0000.00720.62
8.2.20.0000.00817.74
8.2.10.0050.00318.14
8.2.00.0000.00717.99
8.1.280.0070.00725.92
8.1.270.0050.00322.24
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0000.01023.92
8.1.230.0080.00317.66
8.1.220.0030.00517.78
8.1.210.0000.00818.77
8.1.200.0000.01017.25
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0000.00818.63
8.1.160.0050.00222.07
8.1.150.0000.00718.81
8.1.140.0040.00419.71
8.1.130.0050.00317.59
8.1.120.0020.00517.52
8.1.110.0070.00317.50
8.1.100.0050.00317.37
8.1.90.0030.00517.39
8.1.80.0050.00317.29
8.1.70.0000.00717.49
8.1.60.0060.00317.51
8.1.50.0030.00617.53
8.1.40.0040.00417.56
8.1.30.0040.00417.55
8.1.20.0040.00417.65
8.1.10.0040.00417.60
8.1.00.0040.00417.48
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0030.00318.52
8.0.270.0000.00817.24
8.0.260.0030.00317.26
8.0.250.0040.00416.85
8.0.240.0040.00416.88
8.0.230.0030.00316.84
8.0.220.0000.00716.92
8.0.210.0060.00316.86
8.0.200.0030.00316.95
8.0.190.0000.00816.98
8.0.180.0000.00816.90
8.0.170.0040.00416.88
8.0.160.0000.00717.02
8.0.150.0000.00716.80
8.0.140.0030.00616.77
8.0.130.0000.00613.34
8.0.120.0030.00516.94
8.0.110.0000.00816.86
8.0.100.0050.00216.95
8.0.90.0040.00416.87
8.0.80.0060.01016.89
8.0.70.0070.00016.79
8.0.60.0070.00317.01
8.0.50.0040.00416.79
8.0.30.0120.00517.33
8.0.20.0100.00917.40
8.0.10.0000.00716.95
8.0.00.0090.00816.77
7.4.330.0060.00015.08
7.4.320.0060.00016.54
7.4.300.0070.00016.58
7.4.290.0030.00316.53
7.4.280.0030.00516.59
7.4.270.0030.00316.51
7.4.260.0030.00316.60
7.4.250.0090.00016.54
7.4.240.0010.00616.60
7.4.230.0000.00716.41
7.4.220.0130.00716.61
7.4.210.0090.00616.67
7.4.200.0050.00216.54
7.4.160.0050.01016.41
7.4.150.0090.01517.40
7.4.140.0180.01617.86
7.4.130.0110.01116.59
7.4.120.0100.00716.62
7.4.110.0160.00916.69
7.4.100.0100.01316.61
7.4.90.0110.00616.55
7.4.80.0120.01219.39
7.4.70.0130.01016.64
7.4.60.0080.00816.50
7.4.50.0060.00916.52
7.4.40.0110.00616.76
7.4.30.0110.01116.39
7.4.00.0070.01014.97
7.3.330.0020.00513.28
7.3.320.0050.00013.33
7.3.310.0030.00316.17
7.3.300.0000.00716.23
7.3.290.0050.01116.37
7.3.280.0100.01216.34
7.3.270.0090.00917.40
7.3.260.0120.00916.60
7.3.250.0110.00616.40
7.3.240.0140.00616.43
7.3.230.0100.00716.39
7.3.210.0090.00616.49
7.3.200.0090.00916.40
7.3.190.0100.00716.35
7.3.180.0100.00616.49
7.3.170.0170.00016.42
7.3.160.0040.01216.47
7.3.120.0030.01415.04
7.3.110.0120.00615.07
7.3.100.0070.00714.95
7.3.90.0080.00614.87
7.3.80.0060.00914.95
7.3.70.0110.00314.86
7.3.60.0120.00314.70
7.3.50.0100.00314.94
7.3.40.0060.00614.86
7.3.30.0000.01414.84
7.3.20.0000.01416.65
7.3.10.0060.00916.58
7.3.00.0030.00916.68
7.2.330.0060.01216.75
7.2.320.0090.00916.55
7.2.310.0070.01116.75
7.2.300.0120.00416.88
7.2.290.0110.01016.69
7.2.250.0030.01515.00
7.2.240.0030.01715.16
7.2.230.0030.01314.54
7.2.220.0030.01014.96
7.2.210.0120.00614.90
7.2.200.0120.00315.24
7.2.190.0070.00714.90
7.2.180.0060.00615.14
7.2.170.0070.00314.81
7.2.60.0040.01116.52
7.2.00.0030.01019.16
7.1.330.0000.01515.73
7.1.320.0040.00415.62
7.1.310.0050.00515.91
7.1.300.0030.00715.82
7.1.290.0060.00915.75
7.1.280.0000.01215.78
7.1.270.0030.01215.93
7.1.260.0060.00815.49
7.1.200.0060.00615.79
7.1.100.0040.00418.16
7.1.70.0000.00716.96
7.1.60.0070.01819.48
7.1.50.0090.01216.93
7.1.00.0070.07322.46
7.0.200.0420.00714.37
7.0.60.0070.07019.78
7.0.50.0000.04317.79
7.0.40.0130.08020.09
7.0.30.0300.08020.20
7.0.20.0370.07320.10
7.0.10.0000.04720.25
7.0.00.0000.09020.22
5.6.280.0000.06021.14
5.6.210.0070.08020.57
5.6.200.0130.07018.29
5.6.190.0070.08720.77
5.6.180.0100.04720.34
5.6.170.0300.05020.44
5.6.160.0130.07720.71
5.6.150.0030.05018.15
5.6.140.0100.05318.23
5.6.130.0030.04718.15
5.6.120.0100.07321.00
5.6.110.0100.07721.02
5.6.100.0070.04020.99
5.6.90.0030.04020.97
5.6.80.0000.06720.38
5.5.350.4400.04020.53
5.5.340.0030.03718.09
5.5.330.0130.07720.32
5.5.320.0200.06020.20
5.5.310.0400.06020.41
5.5.300.0070.07717.96
5.5.290.0030.04317.98
5.5.280.0100.03720.86
5.5.270.0270.04720.80
5.5.260.0100.08320.68
5.5.250.0030.08320.72
5.5.240.0300.03020.13

preferences:
54.77 ms | 401 KiB | 5 Q