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)) { // foreach($record as $key_internal=>$value_internal) // if($key_internal == $key) // $value_internal = self::$asterisk; echo "\n"; printArray($record); } else { //self::recursionInitiator($record, $key); 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.00716.88
8.3.50.0080.00821.95
8.3.40.0130.00618.84
8.3.30.0120.00318.94
8.3.20.0040.00420.30
8.3.10.0050.00323.46
8.3.00.0040.00419.29
8.2.180.0160.00618.29
8.2.170.0070.00722.96
8.2.160.0100.00322.08
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0070.00417.50
8.2.120.0050.00326.35
8.2.110.0070.00419.38
8.2.100.0090.00317.93
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0000.00917.93
8.2.50.0000.00918.07
8.2.40.0030.00519.41
8.2.30.0080.00020.68
8.2.20.0000.00917.67
8.2.10.0040.00418.08
8.2.00.0050.00318.17
8.1.280.0210.00025.92
8.1.270.0000.00922.32
8.1.260.0030.00528.09
8.1.250.0000.00828.09
8.1.240.0060.00322.40
8.1.230.0080.00317.66
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0090.00018.61
8.1.160.0030.00522.05
8.1.150.0030.00518.86
8.1.140.0040.00419.63
8.1.130.0070.00017.76
8.1.120.0000.00817.57
8.1.110.0040.00417.50
8.1.100.0050.00217.46
8.1.90.0000.00717.54
8.1.80.0000.00917.50
8.1.70.0000.00717.49
8.1.60.0090.00017.61
8.1.50.0000.00817.52
8.1.40.0000.00917.45
8.1.30.0000.00817.67
8.1.20.0030.00617.67
8.1.10.0060.00317.51
8.1.00.0030.00717.46
8.0.300.0000.00918.77
8.0.290.0000.00716.88
8.0.280.0040.00418.51
8.0.270.0000.01017.37
8.0.260.0000.00617.22
8.0.250.0000.00817.04
8.0.240.0070.00017.09
8.0.230.0070.00016.96
8.0.220.0030.00317.04
8.0.210.0030.00316.92
8.0.200.0070.00016.94
8.0.190.0000.00717.07
8.0.180.0070.00017.05
8.0.170.0040.00417.06
8.0.160.0070.00017.05
8.0.150.0050.00616.84
8.0.140.0050.00316.98
8.0.130.0030.00313.48
8.0.120.0040.00416.95
8.0.110.0040.00417.00
8.0.100.0000.00717.05
8.0.90.0000.00717.00
8.0.80.0030.01217.02
8.0.70.0040.00417.03
8.0.60.0040.00417.05
8.0.50.0080.00016.95
8.0.30.0100.01017.29
8.0.20.0100.00917.40
8.0.10.0060.00317.14
8.0.00.0080.00916.82
7.4.330.0020.00215.14
7.4.320.0060.00016.64
7.4.300.0040.00416.57
7.4.290.0070.00016.54
7.4.280.0040.00416.46
7.4.270.0030.00316.66
7.4.260.0040.00416.51
7.4.250.0050.00316.63
7.4.240.0000.00816.62
7.4.230.0030.00316.55
7.4.220.0070.01116.69
7.4.210.0070.01016.61
7.4.200.0030.00516.71
7.4.160.0050.01016.34
7.4.150.0050.01117.40
7.4.140.0130.00917.86
7.4.130.0090.01016.58
7.4.120.0080.01016.68
7.4.110.0060.01116.56
7.4.100.0070.01116.59
7.4.90.0100.00716.43
7.4.80.0060.01219.39
7.4.70.0060.01116.58
7.4.60.0100.00616.55
7.4.50.0040.01116.51
7.4.40.0070.01616.72
7.4.30.0070.01016.71
7.4.00.0070.00914.94
7.3.330.0000.00613.26
7.3.320.0000.00513.43
7.3.310.0040.00416.55
7.3.300.0000.00616.41
7.3.290.0070.00816.45
7.3.280.0080.01016.44
7.3.270.0070.01017.40
7.3.260.0100.01016.43
7.3.250.0130.00616.54
7.3.240.0130.00516.56
7.3.230.0090.00916.60
7.3.210.0030.01316.41
7.3.200.0060.01116.70
7.3.190.0130.00616.63
7.3.180.0080.00816.56
7.3.170.0140.00316.52
7.3.160.0120.00316.45
7.3.120.0120.00314.84
7.3.110.0030.01414.64
7.3.100.0120.00614.62
7.3.90.0100.00314.86
7.3.80.0030.01014.88
7.3.70.0040.00814.77
7.3.60.0040.01114.90
7.3.50.0070.00714.74
7.3.40.0100.00414.83
7.3.30.0070.00314.50
7.3.20.0070.01116.37
7.3.10.0060.00616.65
7.3.00.0000.01416.64
7.2.330.0070.01016.66
7.2.320.0090.00916.82
7.2.310.0100.00716.78
7.2.300.0100.00716.62
7.2.290.0170.00616.88
7.2.250.0000.01915.17
7.2.240.0090.00615.09
7.2.230.0100.00715.20
7.2.220.0070.00714.86
7.2.210.0060.00614.84
7.2.200.0060.00314.94
7.2.190.0040.00814.87
7.2.180.0000.01115.18
7.2.170.0040.00415.10
7.2.60.0120.00616.65
7.2.00.0030.00619.46
7.1.330.0030.01015.46
7.1.320.0070.00715.61
7.1.310.0090.00615.65
7.1.300.0000.01415.57
7.1.290.0120.00015.47
7.1.280.0000.01015.63
7.1.270.0030.00615.68
7.1.260.0060.01215.70
7.1.200.0000.01115.81
7.1.100.0060.00917.98
7.1.70.0030.00716.81
7.1.60.0170.00719.48
7.1.50.0080.00316.99
7.1.00.0030.07322.54
7.0.200.0040.00416.75
7.0.60.0100.06319.92
7.0.50.0200.06717.93
7.0.40.0030.04720.15
7.0.30.0070.07320.16
7.0.20.0230.04020.09
7.0.10.0070.07720.30
7.0.00.0070.05020.18
5.6.280.0070.06720.88
5.6.210.0030.04320.77
5.6.200.0030.08318.16
5.6.190.0100.07320.61
5.6.180.0370.07320.46
5.6.170.0200.05720.54
5.6.160.0000.06320.39
5.6.150.0070.05318.12
5.6.140.0070.05018.18
5.6.130.0070.08318.18
5.6.120.0070.07321.15
5.6.110.0070.08021.12
5.6.100.0200.07021.02
5.6.90.0000.04321.13
5.6.80.0070.07320.37
5.5.350.3730.03720.41
5.5.340.0130.06017.98
5.5.330.0100.08320.34
5.5.320.0270.06320.27
5.5.310.0230.04320.37
5.5.300.0030.04017.93
5.5.290.0070.04017.94
5.5.280.0130.03320.98
5.5.270.0100.04020.89
5.5.260.0070.04320.84
5.5.250.0030.04020.71
5.5.240.0230.06020.28

preferences:
48.97 ms | 401 KiB | 5 Q