3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_print($item, $key) { echo "$key holds $item\n"; } function recursion($array) { if(count($array) == 0) return; foreach (new RecursiveIteratorIterator( new RecursiveArrayIterator($array), RecursiveIteratorIterator::CATCH_GET_CHILD) as $key => $value) { if(is_array($value)) { echo 'My Array Node ' . $key; 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.0090.00918.43
8.3.50.0100.01122.05
8.3.40.0040.01118.71
8.3.30.0090.00618.69
8.3.20.0040.00420.30
8.3.10.0080.00023.48
8.3.00.0060.00319.38
8.2.180.0160.00918.54
8.2.170.0140.00722.96
8.2.160.0070.00722.00
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0110.00017.50
8.2.120.0080.00026.35
8.2.110.0180.00420.53
8.2.100.0000.01117.80
8.2.90.0030.00519.25
8.2.80.0050.00317.97
8.2.70.0060.00317.25
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0030.00619.34
8.2.30.0070.00020.61
8.2.20.0000.00917.62
8.2.10.0000.00817.99
8.2.00.0060.00318.17
8.1.280.0070.01125.92
8.1.270.0000.00921.89
8.1.260.0060.00328.09
8.1.250.0000.00728.09
8.1.240.0040.00423.92
8.1.230.0040.00817.76
8.1.220.0060.00317.78
8.1.210.0090.00018.77
8.1.200.0060.00317.22
8.1.190.0050.00317.13
8.1.180.0020.00518.10
8.1.170.0080.00018.64
8.1.160.0050.00222.00
8.1.150.0050.00218.88
8.1.140.0060.00319.64
8.1.130.0030.00317.74
8.1.120.0000.00817.43
8.1.110.0000.01017.41
8.1.100.0080.00017.48
8.1.90.0000.00717.38
8.1.80.0000.00717.36
8.1.70.0000.00717.39
8.1.60.0040.00417.59
8.1.50.0040.00417.40
8.1.40.0060.00317.54
8.1.30.0050.00317.64
8.1.20.0040.00417.63
8.1.10.0030.00517.57
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.38
8.0.270.0000.00717.25
8.0.260.0000.00817.30
8.0.250.0040.00417.02
8.0.240.0000.00716.95
8.0.230.0040.00416.93
8.0.220.0070.00016.91
8.0.210.0050.00616.79
8.0.200.0000.00616.90
8.0.190.0000.00816.85
8.0.180.0040.00416.92
8.0.170.0040.00416.93
8.0.160.0000.00716.89
8.0.150.0030.00316.84
8.0.140.0080.00016.70
8.0.130.0030.00313.31
8.0.120.0080.00016.91
8.0.110.0040.00416.72
8.0.100.0000.00716.88
8.0.90.0070.00016.77
8.0.80.0100.00716.93
8.0.70.0000.00817.00
8.0.60.0000.00716.71
8.0.50.0030.00516.89
8.0.30.0210.01217.09
8.0.20.0120.00917.40
8.0.10.0040.00417.05
8.0.00.0080.01116.74
7.4.330.0040.00415.08
7.4.320.0060.00016.61
7.4.300.0000.00616.59
7.4.290.0000.00816.37
7.4.280.0080.00016.48
7.4.270.0040.00416.47
7.4.260.0040.00416.57
7.4.250.0000.00716.46
7.4.240.0000.00716.60
7.4.230.0020.00516.57
7.4.220.0100.01416.61
7.4.210.0100.00416.45
7.4.200.0040.00416.68
7.4.160.0070.01016.45
7.4.150.0070.01117.40
7.4.140.0090.01417.86
7.4.130.0100.01016.44
7.4.120.0070.01116.65
7.4.110.0070.01516.54
7.4.100.0160.00716.47
7.4.90.0160.00716.45
7.4.80.0070.01419.39
7.4.70.0110.00716.72
7.4.60.0030.01216.54
7.4.50.0040.01116.24
7.4.40.0070.01016.62
7.4.30.0180.00016.43
7.4.00.0060.01014.79
7.3.330.0040.00413.30
7.3.320.0000.00513.25
7.3.310.0030.00316.33
7.3.300.0070.00016.28
7.3.290.0080.00716.30
7.3.280.0070.01216.28
7.3.270.0120.01217.40
7.3.260.0060.01616.41
7.3.250.0080.00916.49
7.3.240.0120.01116.46
7.3.230.0070.01016.39
7.3.210.0080.00816.54
7.3.200.0120.00616.57
7.3.190.0120.00616.57
7.3.180.0040.01516.30
7.3.170.0100.00616.64
7.3.160.0130.00316.23
7.3.10.0030.00916.43
7.3.00.0060.00616.51
7.2.330.0030.01416.54
7.2.320.0090.00916.63
7.2.310.0030.01316.54
7.2.300.0060.01016.82
7.2.290.0090.01316.80
7.2.130.0110.00516.89
7.2.120.0070.00716.87
7.2.110.0140.00316.80
7.2.100.0050.00716.77
7.2.90.0060.01117.06
7.2.80.0080.00716.92
7.2.70.0060.00916.82
7.2.60.0110.00416.94
7.2.50.0090.00416.88
7.2.40.0060.00516.88
7.2.30.0100.00816.95
7.2.20.0050.01016.70
7.2.10.0080.01416.86
7.2.00.0120.00817.63
7.1.250.0030.00715.59
7.1.200.0070.00715.85
7.1.100.0070.00318.03
7.1.70.0040.00416.86
7.1.60.0070.01719.48
7.1.50.0040.01916.57
7.1.00.0000.08022.51
7.0.200.0430.00014.42
7.0.60.0100.08019.91
7.0.50.0030.04017.87
7.0.40.0030.05020.18
7.0.30.0270.07720.05
7.0.20.0470.05020.23
7.0.10.0030.09020.07
7.0.00.0070.07020.15
5.6.280.0030.05321.14
5.6.210.0230.06020.49
5.6.200.0070.07718.29
5.6.190.0100.05720.52
5.6.180.0300.07720.48
5.6.170.0400.07720.57
5.6.160.0100.07720.54
5.6.150.0130.07018.19
5.6.140.0100.04018.12
5.6.130.0030.07018.14
5.6.120.0030.09020.92
5.6.110.0070.08021.14
5.6.100.0170.03320.97
5.6.90.0070.05721.13
5.6.80.0100.08020.37
5.5.350.3970.03320.45
5.5.340.0030.04018.07
5.5.330.0030.04320.35
5.5.320.0270.07720.27
5.5.310.0270.07720.36
5.5.300.0130.06717.97
5.5.290.0070.07017.98
5.5.280.0030.09320.80
5.5.270.0100.04720.83
5.5.260.0030.08320.77
5.5.250.0030.08320.69
5.5.240.0230.07020.06

preferences:
53.23 ms | 401 KiB | 5 Q