3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Recursion { private static function printArray() { print_r(self::$array); } public static function recursionInitiatorParent($information, $list) { self::$array = $information; self::$keylist = $list; $keywords = explode(",", self::$keylist); echo "Before: \n\n"; self::printArray(); foreach($keywords as $key) self::recursionInitiator(self::$array, $key); echo "\n======================================= \n\n"; self::printArray(); } private static function recursionInitiator($a, $key) { if(count($a) < 1) return; foreach($a as $record) { if(is_array($record)) { foreach($record as $key_internal=>$value_internal) if($key_internal == $key) $value_internal = self::$asterisk; } else self::recursionInitiator($record, $key); } } private static $asterisk = "**"; private static $array; private static $keylist; } $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 = "telephone,iin"; Recursion::recursionInitiatorParent($information, $list);

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.120.0040.00418.98
8.3.110.0060.00320.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0060.00316.75
8.3.70.0120.00316.73
8.3.60.0120.00317.00
8.3.50.0090.00922.17
8.3.40.0070.01019.02
8.3.30.0140.00018.84
8.3.20.0040.00420.34
8.3.10.0040.00423.52
8.3.00.0050.00319.27
8.2.240.0080.00017.20
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0050.00326.77
8.2.200.0030.00616.63
8.2.190.0070.01116.88
8.2.180.0080.01518.29
8.2.170.0100.01022.96
8.2.160.0100.00321.98
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00419.23
8.2.120.0090.00026.35
8.2.110.0090.00019.30
8.2.100.0090.00317.93
8.2.90.0030.00519.05
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0080.00318.03
8.2.50.0000.00818.07
8.2.40.0000.00819.28
8.2.30.0000.00720.54
8.2.20.0000.00917.75
8.2.10.0000.00718.23
8.2.00.0070.00018.22
8.1.290.0030.00718.88
8.1.280.0060.00925.92
8.1.270.0060.00322.18
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0030.00619.53
8.1.230.0110.00017.76
8.1.220.0040.00417.78
8.1.210.0060.00318.77
8.1.200.0100.00017.47
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00818.59
8.1.160.0040.00421.94
8.1.150.0000.00718.90
8.1.140.0050.00319.54
8.1.130.0040.00417.66
8.1.120.0070.00017.42
8.1.110.0000.00917.56
8.1.100.0040.00417.49
8.1.90.0000.00717.50
8.1.80.0050.00517.54
8.1.70.0070.00017.47
8.1.60.0040.00417.63
8.1.50.0000.00817.54
8.1.40.0040.00417.57
8.1.30.0040.00417.73
8.1.20.0030.00517.74
8.1.10.0040.00417.69
8.1.00.0070.00317.61
8.0.300.0080.00018.77
8.0.290.0030.00616.88
8.0.280.0040.00418.50
8.0.270.0000.00917.32
8.0.260.0030.00317.22
8.0.250.0050.00217.13
8.0.240.0040.00417.09
8.0.230.0070.00017.04
8.0.220.0070.00017.02
8.0.210.0070.00016.94
8.0.200.0070.00016.98
8.0.190.0000.00717.03
8.0.180.0040.00416.94
8.0.170.0000.00816.93
8.0.160.0030.00517.09
8.0.150.0040.00416.84
8.0.140.0000.00716.94
8.0.130.0000.00613.39
8.0.120.0000.00816.97
8.0.110.0040.00416.98
8.0.100.0030.00517.04
8.0.90.0040.00416.96
8.0.80.0090.00616.89
8.0.70.0040.00417.00
8.0.60.0040.00416.82
8.0.50.0040.00416.98
8.0.30.0050.01217.08
8.0.20.0110.00917.40
8.0.10.0030.00616.98
8.0.00.0070.01016.79
7.4.330.0050.00015.14
7.4.320.0000.00616.66
7.4.300.0030.00316.59
7.4.290.0030.00316.63
7.4.280.0000.00816.46
7.4.270.0030.00316.57
7.4.260.0070.00016.54
7.4.250.0060.00316.54
7.4.240.0040.00416.63
7.4.230.0030.00316.39
7.4.220.0180.00716.75
7.4.210.0070.01316.68
7.4.200.0040.00416.39
7.4.160.0120.00416.43
7.4.150.0070.01017.40
7.4.140.0090.01017.86
7.4.130.0160.00316.57
7.4.120.0140.00516.61
7.4.110.0160.01016.64
7.4.100.0060.01316.66
7.4.90.0120.00616.65
7.4.80.0130.00419.39
7.4.70.0130.00316.46
7.4.60.0070.01016.48
7.4.50.0000.01616.52
7.4.40.0070.01416.35
7.4.30.0030.01416.70
7.4.00.0080.00415.26
7.3.330.0050.00013.42
7.3.320.0050.00013.26
7.3.310.0050.00316.54
7.3.300.0070.00016.40
7.3.290.0100.00716.43
7.3.280.0120.00616.44
7.3.270.0090.00917.40
7.3.260.0110.01316.61
7.3.240.0080.01116.50
7.3.230.0070.01016.68
7.3.210.0070.01316.52
7.3.200.0100.00716.43
7.3.190.0080.00816.63
7.3.180.0030.01216.49
7.3.170.0080.00916.46
7.3.160.0070.01016.54
7.2.330.0070.01116.78
7.2.320.0120.00916.71
7.2.310.0120.00416.64
7.2.300.0130.00316.75
7.2.290.0060.01616.48
7.2.60.0060.00916.91
7.2.00.0030.01019.44
7.1.200.0000.01416.02
7.1.100.0000.01218.02
7.1.70.0060.00917.19
7.1.60.0100.01619.48
7.1.50.0060.00616.82
7.1.00.0070.07322.37
7.0.200.0000.00816.91
7.0.60.0000.06019.95
7.0.50.0030.06317.89
7.0.40.0030.04720.09
7.0.30.0230.07720.21
7.0.20.0170.04320.23
7.0.10.0070.04720.07
7.0.00.0070.05720.14
5.6.280.0030.03720.82
5.6.210.0130.07020.54
5.6.200.0100.07718.29
5.6.190.0000.08720.77
5.6.180.0130.05320.67
5.6.170.0300.07720.46
5.6.160.0070.08720.39
5.6.150.0070.08018.25
5.6.140.0030.05718.19
5.6.130.0200.07018.16
5.6.120.0100.08721.00
5.6.110.0070.08321.10
5.6.100.0070.04021.03
5.6.90.0030.08720.98
5.6.80.0100.07720.54
5.5.350.4030.04320.45
5.5.340.0330.04318.02
5.5.330.0070.05020.13
5.5.320.0230.05020.36
5.5.310.0330.07720.37
5.5.300.0000.04317.98
5.5.290.0030.09018.04
5.5.280.0130.07720.66
5.5.270.0000.04320.74
5.5.260.0130.06720.88
5.5.250.0100.07020.70
5.5.240.0200.07020.17

preferences:
52.49 ms | 403 KiB | 5 Q