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) { if(count($array) < 1) return; foreach($a as $record) { if(is_array($record)) { self::recursionInitiator($record, $key); // echo "\n"; // self::printArray($record); } else { $record[0] = self::$asterisk; // 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.0070.01116.63
8.3.50.0110.00922.11
8.3.40.0100.00718.85
8.3.30.0070.00718.79
8.3.20.0050.00320.21
8.3.10.0080.00023.70
8.3.00.0080.00019.38
8.2.180.0070.01118.41
8.2.170.0120.00322.96
8.2.160.0140.00622.17
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0060.00617.75
8.2.120.0080.00026.35
8.2.110.0030.00720.95
8.2.100.0080.00417.91
8.2.90.0000.00917.90
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0080.00318.07
8.2.40.0080.00019.46
8.2.30.0040.00420.56
8.2.20.0040.00517.78
8.2.10.0000.00718.02
8.2.00.0000.00818.06
8.1.280.0040.01125.92
8.1.270.0050.00322.14
8.1.260.0030.00628.09
8.1.250.0070.00028.09
8.1.240.0060.00322.61
8.1.230.0070.00421.02
8.1.220.0030.00517.74
8.1.210.0000.00918.97
8.1.200.0040.00417.35
8.1.190.0040.00417.22
8.1.180.0070.00018.10
8.1.170.0060.00318.54
8.1.160.0040.00422.12
8.1.150.0040.00418.92
8.1.140.0040.00419.57
8.1.130.0000.00717.64
8.1.120.0050.00317.52
8.1.110.0080.00417.44
8.1.100.0070.00017.48
8.1.90.0030.00517.45
8.1.80.0080.00017.48
8.1.70.0030.00317.54
8.1.60.0000.00817.50
8.1.50.0030.00517.55
8.1.40.0040.00417.39
8.1.30.0050.00317.69
8.1.20.0000.00817.67
8.1.10.0080.00017.59
8.1.00.0000.01017.55
8.0.300.0070.00020.04
8.0.290.0040.00416.75
8.0.280.0040.00418.52
8.0.270.0040.00417.32
8.0.260.0000.00717.22
8.0.250.0060.00316.95
8.0.240.0070.00016.93
8.0.230.0070.00016.91
8.0.220.0030.00316.83
8.0.210.0080.00016.95
8.0.200.0000.00716.96
8.0.190.0040.00416.87
8.0.180.0040.00416.93
8.0.170.0040.00417.01
8.0.160.0030.00516.88
8.0.150.0040.00416.95
8.0.140.0040.00416.93
8.0.130.0060.00013.38
8.0.120.0030.00616.83
8.0.110.0000.00816.91
8.0.100.0000.00717.09
8.0.90.0080.00016.81
8.0.80.0060.01016.96
8.0.70.0000.00816.86
8.0.60.0000.00716.93
8.0.50.0090.00016.95
8.0.30.0070.00917.08
8.0.20.0090.00917.40
8.0.10.0040.00417.09
8.0.00.0060.01116.84
7.4.330.0020.00215.08
7.4.320.0030.00316.68
7.4.300.0000.00616.52
7.4.290.0000.00616.62
7.4.280.0070.00016.43
7.4.270.0040.00416.45
7.4.260.0070.00016.54
7.4.250.0080.00016.50
7.4.240.0040.00416.53
7.4.230.0030.00316.43
7.4.220.0170.00016.63
7.4.210.0100.00916.59
7.4.200.0030.00316.55
7.4.160.0050.01116.49
7.4.150.0180.00317.40
7.4.140.0080.01117.86
7.4.130.0100.00616.59
7.4.120.0110.01016.59
7.4.110.0100.01016.59
7.4.100.0130.00716.47
7.4.90.0070.01016.80
7.4.80.0100.01019.39
7.4.70.0060.00916.30
7.4.60.0080.00816.52
7.4.50.0030.01416.59
7.4.40.0140.00316.60
7.4.30.0190.00316.67
7.4.00.0170.00014.68
7.3.330.0000.00613.31
7.3.320.0000.00513.46
7.3.310.0070.00016.55
7.3.300.0030.00316.32
7.3.290.0140.00516.45
7.3.280.0120.00816.45
7.3.270.0100.01617.40
7.3.260.0160.00616.48
7.3.250.0090.00816.45
7.3.240.0080.00916.53
7.3.230.0100.01016.44
7.3.210.0130.00316.43
7.3.200.0130.00316.39
7.3.190.0070.01316.55
7.3.180.0100.00716.43
7.3.170.0030.01316.30
7.3.160.0000.01616.51
7.2.330.0090.00916.42
7.2.320.0110.00716.75
7.2.310.0080.00816.56
7.2.300.0070.01716.88
7.2.290.0130.00616.64
7.2.60.0030.01316.85
7.2.00.0060.00619.50
7.1.200.0060.00315.43
7.1.100.0070.00718.22
7.1.70.0000.00717.19
7.1.60.0130.01319.48
7.1.50.0000.01116.75
7.1.00.0100.07022.48
7.0.200.0040.00416.77
7.0.60.0070.08720.01
7.0.50.0070.08317.85
7.0.40.0200.07720.21
7.0.30.0230.04320.19
7.0.20.0370.07020.23
7.0.10.0030.04320.30
7.0.00.0100.05320.07
5.6.280.0030.03020.87
5.6.210.0030.08720.62
5.6.200.0030.08318.18
5.6.190.0100.07320.39
5.6.180.0070.05020.63
5.6.170.0230.04020.45
5.6.160.0100.05020.61
5.6.150.0030.07718.29
5.6.140.0230.06718.18
5.6.130.0070.05318.22
5.6.120.0070.04721.13
5.6.110.0100.08321.13
5.6.100.0070.03720.94
5.6.90.0100.07021.14
5.6.80.0100.08020.41
5.5.350.4270.04720.40
5.5.340.0070.03317.98
5.5.330.0030.08720.43
5.5.320.0230.07320.31
5.5.310.0300.07320.32
5.5.300.0030.06017.99
5.5.290.0030.04718.03
5.5.280.0070.04020.82
5.5.270.0100.03320.88
5.5.260.0070.07020.98
5.5.250.0100.06320.46
5.5.240.0200.07320.08

preferences:
44.09 ms | 401 KiB | 5 Q