3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Recursion { private static function printArray($a) { print_r($a); } public static function recursionInitiatorParent($information, $list) { self::$array = $information; self::$keylist = $list; $keywords = explode(",", self::$keylist); echo "Before: \n\n"; self::printArray(self::$array); //foreach($keywords as $key) self::recursionInitiator(self::$array, $key); echo "\n======================================= \n\n"; self::printArray(self::$array); } private static function recursionInitiator($a, $key) { foreach($a as $record) { if(is_array($record)) { self::recursionInitiator($record, $key); // echo "\n"; // self::printArray($record); } else { foreach($record as $k=>$v) if($k == $key) $record[$k] = self::$asterisk; // echo "\n" . $record; } } } 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.60.0120.00316.86
8.3.50.0090.00921.98
8.3.40.0120.00319.02
8.3.30.0070.00718.84
8.3.20.0040.00420.16
8.3.10.0040.00423.66
8.3.00.0030.00519.25
8.2.180.0070.01418.41
8.2.170.0130.00722.96
8.2.160.0130.00322.04
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0030.00519.66
8.2.110.0070.00321.06
8.2.100.0110.00017.91
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00418.04
8.2.50.0040.00418.10
8.2.40.0040.00419.40
8.2.30.0040.00420.73
8.2.20.0040.00717.77
8.2.10.0000.00718.14
8.2.00.0030.00518.22
8.1.280.0090.00625.92
8.1.270.0080.00022.08
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.01021.15
8.1.230.0070.00417.70
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0030.00517.35
8.1.180.0090.00018.10
8.1.170.0000.00820.25
8.1.160.0050.00222.05
8.1.150.0050.00318.99
8.1.140.0050.00319.50
8.1.130.0000.00717.79
8.1.120.0070.00017.56
8.1.110.0040.00417.45
8.1.100.0050.00217.41
8.1.90.0040.00417.39
8.1.80.0000.00817.45
8.1.70.0040.00417.36
8.1.60.0000.00817.63
8.1.50.0030.00517.51
8.1.40.0060.00317.54
8.1.30.0080.00017.68
8.1.20.0040.00417.63
8.1.10.0040.00417.63
8.1.00.0040.00717.48
8.0.300.0070.00418.77
8.0.290.0050.00216.88
8.0.280.0030.00318.52
8.0.270.0060.00317.24
8.0.260.0060.00017.34
8.0.250.0030.00517.09
8.0.240.0050.00317.03
8.0.230.0000.00717.09
8.0.220.0070.00016.96
8.0.210.0030.00316.93
8.0.200.0040.00417.04
8.0.190.0060.00316.97
8.0.180.0000.00717.05
8.0.170.0060.00317.03
8.0.160.0040.00316.99
8.0.150.0030.00617.02
8.0.140.0040.00417.02
8.0.130.0060.00013.44
8.0.120.0000.00917.06
8.0.110.0030.00616.95
8.0.100.0030.00517.11
8.0.90.0080.00017.01
8.0.80.0070.01017.04
8.0.70.0080.00016.89
8.0.60.0070.00017.00
8.0.50.0080.00017.07
8.0.30.0070.01217.16
8.0.20.0100.00817.41
8.0.10.0030.00516.95
8.0.00.0140.00616.83
7.4.330.0050.00015.08
7.4.320.0060.00016.61
7.4.300.0030.00316.59
7.4.290.0060.00016.47
7.4.280.0050.00316.55
7.4.270.0030.00316.50
7.4.260.0050.00216.52
7.4.250.0000.00816.48
7.4.240.0070.00016.66
7.4.230.0070.00016.74
7.4.220.0070.01016.73
7.4.210.0150.00016.60
7.4.200.0040.00416.67
7.4.160.0110.00516.46
7.4.150.0110.00617.40
7.4.140.0070.01217.86
7.4.130.0080.01116.53
7.4.120.0140.00616.63
7.4.110.0140.00316.73
7.4.100.0060.01716.45
7.4.90.0120.01216.53
7.4.80.0030.01719.39
7.4.70.0080.00816.43
7.4.60.0030.01316.75
7.4.50.0070.00716.49
7.4.40.0120.00916.71
7.4.30.0140.00316.66
7.4.00.0070.01015.21
7.3.330.0000.00513.46
7.3.320.0030.00313.27
7.3.310.0000.00716.47
7.3.300.0030.00316.46
7.3.290.0080.00816.39
7.3.280.0120.00516.43
7.3.270.0070.01117.40
7.3.260.0070.01016.59
7.3.250.0100.00816.46
7.3.240.0080.01116.40
7.3.230.0110.00616.52
7.3.210.0100.00716.41
7.3.200.0120.00416.48
7.3.190.0160.00016.53
7.3.180.0100.00616.68
7.3.170.0070.01716.32
7.3.160.0130.00316.43
7.2.330.0120.00616.72
7.2.320.0030.01516.76
7.2.310.0120.00416.80
7.2.300.0090.00916.73
7.2.290.0060.01016.82
7.2.00.0060.00619.63
7.1.100.0000.01018.03
7.1.70.0050.00317.13
7.1.60.0070.01719.48
7.1.50.0180.00016.84
7.1.00.0030.07722.33
7.0.200.0060.00816.49
7.0.60.0030.07019.90
7.0.50.0000.08717.97
7.0.40.0100.04020.04
7.0.30.0230.08320.25
7.0.20.0200.03720.10
7.0.10.0030.04320.05
7.0.00.0070.07720.06
5.6.280.0100.06021.11
5.6.210.0230.05020.47
5.6.200.0170.07718.15
5.6.190.0100.08320.50
5.6.180.0270.03320.64
5.6.170.0300.08020.47
5.6.160.0100.05020.48
5.6.150.0070.08018.25
5.6.140.0070.05718.14
5.6.130.0070.07318.21
5.6.120.0030.05321.03
5.6.110.0030.08020.90
5.6.100.0070.04320.89
5.6.90.0030.04321.07
5.6.80.0100.07020.38
5.5.350.4170.04720.43
5.5.340.0130.04317.98
5.5.330.0070.07320.33
5.5.320.0370.07020.30
5.5.310.0230.06320.19
5.5.300.0070.07718.05
5.5.290.0000.04717.98
5.5.280.0070.07320.66
5.5.270.0100.04320.77
5.5.260.0070.08320.84
5.5.250.0030.08320.79
5.5.240.0300.04720.30

preferences:
54.59 ms | 401 KiB | 5 Q