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.40.0110.00318.84
8.3.30.0090.00618.84
8.3.20.0040.00420.29
8.3.10.0040.00423.50
8.3.00.0040.00419.38
8.2.170.0100.01022.96
8.2.160.0170.00322.21
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0090.00317.50
8.2.120.0040.00426.35
8.2.110.0070.00421.09
8.2.100.0060.00618.04
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0020.00519.23
8.2.30.0040.00420.66
8.2.20.0050.00317.73
8.2.10.0050.00318.04
8.2.00.0030.00718.18
8.1.270.0040.00422.08
8.1.260.0040.00428.09
8.1.250.0030.00528.09
8.1.240.0100.00023.97
8.1.230.0060.00617.66
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00917.24
8.1.190.0000.00817.25
8.1.180.0000.00718.10
8.1.170.0040.00418.63
8.1.160.0040.00421.95
8.1.150.0000.00818.89
8.1.140.0090.00019.52
8.1.130.0050.00317.75
8.1.120.0030.00517.48
8.1.110.0030.00717.53
8.1.100.0000.00717.46
8.1.90.0000.00717.39
8.1.80.0000.00817.50
8.1.70.0030.00317.35
8.1.60.0060.00317.44
8.1.50.0040.00417.41
8.1.40.0030.00517.54
8.1.30.0030.00517.61
8.1.20.0030.00617.63
8.1.10.0040.00417.57
8.1.00.0000.00817.40
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0000.00718.55
8.0.270.0000.00717.17
8.0.260.0060.00017.13
8.0.250.0000.00716.84
8.0.240.0000.00716.95
8.0.230.0000.00716.94
8.0.220.0030.00316.89
8.0.210.0030.00716.75
8.0.200.0030.00316.91
8.0.190.0080.00016.89
8.0.180.0040.00416.95
8.0.170.0000.00816.91
8.0.160.0040.00416.95
8.0.150.0040.00416.87
8.0.140.0000.00716.93
8.0.130.0030.00313.38
8.0.120.0060.00316.81
8.0.110.0000.00917.04
8.0.100.0000.00716.98
8.0.90.0070.00016.86
8.0.80.0060.01216.91
8.0.70.0030.00516.82
8.0.60.0040.00417.07
8.0.50.0040.00416.94
8.0.30.0050.01417.06
8.0.20.0090.01217.40
8.0.10.0040.00416.89
8.0.00.0100.00716.70
7.4.330.0060.00015.08
7.4.320.0030.00316.52
7.4.300.0000.00616.59
7.4.290.0070.00016.63
7.4.280.0060.00316.48
7.4.270.0030.00316.52
7.4.260.0000.00716.41
7.4.250.0030.00616.46
7.4.240.0050.00216.53
7.4.230.0040.00416.57
7.4.220.0030.01516.54
7.4.210.0070.00716.45
7.4.200.0000.00716.25
7.4.160.0080.00816.59
7.4.150.0040.01417.40
7.4.140.0140.00917.86
7.4.130.0090.00916.43
7.4.120.0090.01016.49
7.4.110.0130.00616.46
7.4.100.0120.00616.60
7.4.90.0060.01616.58
7.4.80.0100.00719.39
7.4.70.0130.00316.57
7.4.60.0090.01316.65
7.4.50.0070.00716.54
7.4.40.0060.01016.57
7.4.30.0030.01416.57
7.4.10.0030.01014.71
7.4.00.0060.01214.94
7.3.330.0080.00013.36
7.3.320.0050.00013.36
7.3.310.0030.00316.27
7.3.300.0030.00316.23
7.3.290.0040.01016.34
7.3.280.0120.00616.36
7.3.270.0090.00917.40
7.3.260.0090.01216.46
7.3.250.0100.00916.36
7.3.240.0100.01316.55
7.3.230.0170.00316.44
7.3.210.0090.00916.39
7.3.200.0100.00616.42
7.3.190.0070.01716.60
7.3.180.0110.00616.38
7.3.170.0090.00616.50
7.3.160.0030.01316.33
7.3.130.0060.01214.71
7.3.120.0050.01114.84
7.3.110.0050.01014.93
7.3.100.0060.00814.82
7.3.90.0080.00914.80
7.3.80.0040.00914.96
7.3.70.0080.00714.79
7.3.60.0080.00614.84
7.3.50.0070.00914.70
7.3.40.0120.00314.51
7.3.30.0030.01314.82
7.3.20.0080.00516.46
7.3.10.0080.00616.63
7.3.00.0050.00716.83
7.2.330.0080.00816.73
7.2.320.0090.00916.40
7.2.310.0180.00316.45
7.2.300.0160.00016.72
7.2.290.0100.01316.68
7.2.260.0070.01015.09
7.2.250.0110.00715.06
7.2.240.0050.01015.25
7.2.230.0080.00815.02
7.2.220.0070.00914.98
7.2.210.0020.00914.84
7.2.200.0040.00915.04
7.2.190.0030.01215.09
7.2.180.0030.01115.07
7.2.170.0070.00914.84
7.2.160.0030.00915.05
7.2.150.0120.00016.68
7.2.140.0090.00616.91
7.2.130.0070.01116.94
7.2.120.0090.00616.95
7.2.110.0040.00716.84
7.2.100.0040.01116.66
7.2.90.0070.00717.02
7.2.80.0060.01016.91
7.2.70.0000.01017.05
7.2.60.0030.00816.85
7.2.50.0080.00416.91
7.2.40.0090.00617.16
7.2.30.0110.00716.81
7.2.20.0030.00917.04
7.2.10.0060.00916.62
7.2.00.0030.01118.21
7.1.330.0080.00315.79
7.1.320.0070.00715.67
7.1.310.0080.00415.53
7.1.300.0020.01315.67
7.1.290.0060.00615.71
7.1.280.0070.00715.74
7.1.270.0060.00515.70
7.1.260.0110.00515.47
7.1.250.0030.00915.51
7.1.240.0030.00615.96
7.1.230.0060.00615.85
7.1.220.0070.00715.95
7.1.210.0030.01015.72
7.1.200.0070.00715.81
7.1.190.0050.00515.82
7.1.180.0070.00415.80
7.1.170.0060.01015.73
7.1.160.0130.00015.71
7.1.150.0030.01015.85
7.1.140.0090.00315.66
7.1.130.0040.00715.57
7.1.120.0000.01415.73
7.1.110.0000.01415.78
7.1.100.0050.01017.01
7.1.90.0090.00615.80
7.1.80.0060.00915.61
7.1.70.0030.00616.36
7.1.60.0090.00917.67
7.1.50.0020.01016.35
7.1.40.0030.00615.81
7.1.30.0070.00315.75
7.1.20.0110.00415.75
7.1.10.0000.01015.78
7.1.00.0050.04319.14
7.0.330.0040.00415.47
7.0.320.0060.00615.41
7.0.310.0030.00615.39
7.0.300.0060.00315.40
7.0.290.0090.00315.04
7.0.280.0040.00815.31
7.0.270.0030.01015.21
7.0.260.0000.01215.13
7.0.250.0070.00415.05
7.0.240.0110.00415.44
7.0.230.0030.01015.58
7.0.220.0060.00315.33
7.0.210.0060.01015.27
7.0.200.0160.00814.80
7.0.190.0070.00715.54
7.0.180.0060.00315.39
7.0.170.0030.00715.14
7.0.160.0100.00315.20
7.0.150.0060.01015.38
7.0.140.0000.01015.61
7.0.130.0000.01115.46
7.0.120.0000.01015.23
7.0.110.0060.01015.41
7.0.100.0080.00615.52
7.0.90.0060.00915.18
7.0.80.0070.00715.59
7.0.70.0090.00615.46
7.0.60.0030.04017.78
7.0.50.0060.02516.65
7.0.40.0070.03816.80
7.0.30.0080.03016.65
7.0.20.0230.03516.77
7.0.10.0120.04316.78
7.0.00.0030.04916.86
5.6.400.0030.00614.00
5.6.390.0040.01214.68
5.6.380.0070.00414.55
5.6.370.0040.00414.29
5.6.360.0070.00414.45
5.6.350.0030.01314.63
5.6.340.0000.01314.19
5.6.330.0030.01314.19
5.6.320.0060.00314.50
5.6.310.0030.01014.51
5.6.300.0070.00714.12
5.6.290.0030.00714.65
5.6.280.0020.03517.61
5.6.270.0070.00714.13
5.6.260.0000.01214.17
5.6.250.0060.00614.34
5.6.240.0100.00314.17
5.6.230.0000.01414.37
5.6.220.0070.01314.25
5.6.210.0050.04817.35
5.6.200.0030.04616.22
5.6.190.0050.02617.41
5.6.180.0080.02517.61
5.6.170.0160.02317.43
5.6.160.0050.04817.46
5.6.150.0030.04116.14
5.6.140.0060.04316.24
5.6.130.0090.04416.21
5.6.120.0060.04417.60
5.6.110.0060.02617.58
5.6.100.0040.02417.68
5.6.90.0050.03417.68
5.6.80.0090.04317.23
5.6.70.0100.00614.25
5.6.60.0080.00414.24
5.6.50.0120.00414.03
5.6.40.0030.01014.25
5.6.30.0100.00714.32
5.6.20.0090.00614.12
5.6.10.0070.01014.27
5.6.00.0000.00814.19
5.5.380.0040.00914.02
5.5.370.0070.00714.09
5.5.360.0060.00814.17
5.5.350.1930.02217.51
5.5.340.0020.02716.12
5.5.330.0070.04517.44
5.5.320.0150.03817.22
5.5.310.0160.02917.32
5.5.300.0030.05016.04
5.5.290.0050.02316.05
5.5.280.0080.02517.44
5.5.270.0050.04717.66
5.5.260.0070.04717.52
5.5.250.0190.03217.27
5.5.240.0100.02317.19
5.5.230.0080.00414.07
5.5.220.0060.00314.39
5.5.210.0060.00914.29
5.5.200.0090.00413.86
5.5.190.0000.01314.13
5.5.180.0070.00714.44
5.5.170.0060.00314.29
5.5.160.0000.00814.19
5.5.150.0060.00613.92
5.5.140.0030.01014.27
5.5.130.0060.00914.02
5.5.120.0090.00914.20
5.5.110.0040.01114.10
5.5.100.0090.00914.17
5.5.90.0100.00614.32
5.5.80.0060.00914.13
5.5.70.0080.00413.94
5.5.60.0030.00914.07
5.5.50.0060.00614.20
5.5.40.0000.01214.41
5.5.30.0070.00714.35
5.5.20.0040.00813.99
5.5.10.0090.00014.26
5.5.00.0030.00814.16

preferences:
58.09 ms | 400 KiB | 5 Q