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.60.0030.01016.88
8.3.50.0070.01121.99
8.3.40.0060.00919.15
8.3.30.0090.00618.96
8.3.20.0070.00020.16
8.3.10.0040.00423.61
8.3.00.0040.00419.38
8.2.180.0120.00318.28
8.2.170.0090.00622.96
8.2.160.0070.00722.08
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00617.50
8.2.120.0050.00326.35
8.2.110.0060.00322.08
8.2.100.0120.00018.04
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0050.00317.75
8.2.60.0060.00317.93
8.2.50.0080.00018.07
8.2.40.0040.00419.38
8.2.30.0030.00520.73
8.2.20.0000.00917.80
8.2.10.0070.00018.16
8.2.00.0040.00418.04
8.1.280.0170.00325.92
8.1.270.0060.00322.14
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0030.00622.50
8.1.230.0070.00417.78
8.1.220.0050.00317.80
8.1.210.0040.00418.77
8.1.200.0050.00517.48
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0080.00018.66
8.1.160.0060.00322.07
8.1.150.0000.00718.85
8.1.140.0080.00019.59
8.1.130.0030.00317.76
8.1.120.0050.00217.51
8.1.110.0040.00417.45
8.1.100.0000.00717.57
8.1.90.0000.00817.55
8.1.80.0060.00317.58
8.1.70.0030.00317.38
8.1.60.0030.00717.48
8.1.50.0000.00817.60
8.1.40.0060.00317.53
8.1.30.0040.00417.56
8.1.20.0030.00517.66
8.1.10.0000.00817.64
8.1.00.0000.01117.57
8.0.300.0080.00018.84
8.0.290.0080.00016.88
8.0.280.0020.00518.43
8.0.270.0060.00317.23
8.0.260.0030.00317.22
8.0.250.0000.00716.94
8.0.240.0030.00517.07
8.0.230.0030.00316.98
8.0.220.0000.00716.89
8.0.210.0030.00517.00
8.0.200.0040.00417.06
8.0.190.0040.00417.02
8.0.180.0000.00817.00
8.0.170.0080.00016.93
8.0.160.0040.00417.07
8.0.150.0030.00717.00
8.0.140.0040.00416.95
8.0.130.0000.00513.42
8.0.120.0030.00616.86
8.0.110.0040.00417.03
8.0.100.0040.00417.02
8.0.90.0000.00717.04
8.0.80.0030.01616.96
8.0.70.0000.00817.06
8.0.60.0040.00416.86
8.0.50.0050.00216.88
8.0.30.0050.01217.24
8.0.20.0080.01317.40
8.0.10.0040.00417.06
8.0.00.0100.00716.83
7.4.330.0000.00515.14
7.4.320.0030.00316.63
7.4.300.0070.00016.64
7.4.290.0040.00416.59
7.4.280.0000.00816.40
7.4.270.0030.00316.50
7.4.260.0000.00616.62
7.4.250.0000.00816.56
7.4.240.0040.00316.65
7.4.230.0070.00016.39
7.4.220.0070.01116.65
7.4.210.0090.01216.55
7.4.200.0000.00716.71
7.4.160.0180.00016.52
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0050.01216.53
7.4.120.0110.00916.56
7.4.110.0110.00716.64
7.4.100.0090.00916.58
7.4.90.0170.00016.66
7.4.80.0090.01219.39
7.4.70.0040.01116.38
7.4.60.0100.00716.50
7.4.50.0030.01216.44
7.4.40.0190.00016.65
7.4.30.0070.01716.46
7.4.00.0070.01115.16
7.3.330.0060.00013.45
7.3.320.0000.00513.36
7.3.310.0040.00416.34
7.3.300.0000.00716.39
7.3.290.0070.01016.45
7.3.280.0080.01316.41
7.3.270.0120.00617.40
7.3.260.0110.00916.54
7.3.250.0090.00916.56
7.3.240.0150.00516.44
7.3.230.0150.00416.44
7.3.210.0090.00816.61
7.3.200.0120.00416.43
7.3.190.0040.01616.39
7.3.180.0070.01016.64
7.3.170.0070.01416.58
7.3.160.0100.00616.36
7.3.120.0080.00814.98
7.3.110.0070.01214.72
7.3.100.0080.00814.75
7.3.90.0080.00314.97
7.3.80.0080.00714.78
7.3.70.0090.00515.00
7.3.60.0050.00914.84
7.3.50.0070.00714.83
7.3.40.0030.01214.97
7.3.30.0090.00514.96
7.3.20.0080.00616.55
7.3.10.0090.00616.70
7.3.00.0050.00916.60
7.2.330.0090.00916.79
7.2.320.0130.00316.53
7.2.310.0090.00816.74
7.2.300.0160.00816.52
7.2.290.0140.00716.82
7.2.250.0070.01214.85
7.2.240.0060.01315.18
7.2.230.0080.00815.30
7.2.220.0100.00315.15
7.2.210.0060.00615.21
7.2.200.0050.01015.17
7.2.190.0030.00815.12
7.2.180.0030.01315.04
7.2.170.0020.01415.01
7.2.160.0070.00714.86
7.2.150.0050.00516.85
7.2.140.0040.00816.93
7.2.130.0050.00816.83
7.2.120.0070.00516.77
7.2.110.0080.00516.68
7.2.100.0090.00616.91
7.2.90.0050.00616.79
7.2.80.0080.00817.01
7.2.70.0050.01016.78
7.2.60.0090.00816.96
7.2.50.0060.00716.95
7.2.40.0100.00516.84
7.2.30.0100.00616.95
7.2.20.0110.00916.82
7.2.10.0100.00917.01
7.2.00.0100.00617.39
7.1.330.0050.01015.97
7.1.320.0090.00115.93
7.1.310.0060.00915.81
7.1.300.0050.00715.71
7.1.290.0050.00815.81
7.1.280.0060.00815.70
7.1.270.0060.00515.55
7.1.260.0060.00615.96
7.1.250.0070.00615.52
7.1.240.0040.00815.79
7.1.230.0100.00215.84
7.1.220.0030.00815.78
7.1.210.0020.01115.73
7.1.200.0050.00615.80
7.1.190.0060.00915.73
7.1.180.0020.00815.70
7.1.170.0050.00515.77
7.1.160.0050.00815.72
7.1.150.0090.00615.86
7.1.140.0050.00815.74
7.1.130.0060.00515.79
7.1.120.0070.00315.96
7.1.110.0050.00815.99
7.1.100.0030.00816.35
7.1.90.0040.00715.86
7.1.80.0090.00215.68
7.1.70.0080.00216.14
7.1.60.0040.01116.67
7.1.50.0060.00716.04
7.1.40.0030.00715.86
7.1.30.0090.00715.83
7.1.20.0070.00515.75
7.1.10.0070.00715.79
7.1.00.0070.02417.53
7.0.330.0060.00615.25
7.0.320.0050.00515.33
7.0.310.0050.00615.45
7.0.300.0080.00715.30
7.0.290.0050.00615.34
7.0.280.0080.01015.36
7.0.270.0060.00515.38
7.0.260.0080.00715.15
7.0.250.0080.00615.30
7.0.240.0080.00515.31
7.0.230.0050.00915.44
7.0.220.0100.00915.32
7.0.210.0100.00815.50
7.0.200.0060.00815.76
7.0.190.0120.00615.39
7.0.180.0020.01215.28
7.0.170.0060.00815.45
7.0.160.0080.00615.43
7.0.150.0110.00715.37
7.0.140.0070.00715.39
7.0.130.0070.01115.35
7.0.120.0090.00615.46
7.0.110.0050.00615.44
7.0.100.0090.00515.38
7.0.90.0060.00715.39
7.0.80.0030.01015.41
7.0.70.0130.00815.43
7.0.60.0100.02116.50
7.0.50.0040.02715.95
7.0.40.0030.02715.17
7.0.30.0040.02515.17
7.0.20.0120.01815.03
7.0.10.0060.01715.00
7.0.00.0030.02115.15
5.6.400.0070.00714.61
5.6.390.0090.00014.73
5.6.380.0040.00814.36
5.6.370.0060.00914.53
5.6.360.0070.00514.46
5.6.350.0080.00614.45
5.6.340.0020.00814.36
5.6.330.0020.01214.48
5.6.320.0090.00414.40
5.6.310.0040.01014.41
5.6.300.0060.00614.26
5.6.290.0090.00514.40
5.6.280.0060.02216.06
5.6.270.0050.00714.41
5.6.260.0080.00514.37
5.6.250.0050.00514.49
5.6.240.0060.00614.40
5.6.230.0050.00914.34
5.6.220.0040.00614.36
5.6.210.0070.01815.83
5.6.200.0060.02415.30
5.6.190.0060.02415.98
5.6.180.0120.02315.90
5.6.170.0110.01915.89
5.6.160.0050.01816.02
5.6.150.0050.01715.40
5.6.140.0070.02215.33
5.6.130.0030.01815.37
5.6.120.0060.01316.01
5.6.110.0090.02315.83
5.6.100.0060.02816.17
5.6.90.0090.01515.91
5.6.80.0070.02215.87
5.6.70.0070.00414.38
5.6.60.0080.00614.24
5.6.50.0090.00614.36
5.6.40.0050.00714.15
5.6.30.0070.00714.05
5.6.20.0100.00514.36
5.6.10.0060.00614.37
5.6.00.0060.00814.35
5.5.380.0030.00712.24
5.5.370.0060.00612.15
5.5.360.0070.00512.19
5.5.350.1080.01814.32
5.5.340.0050.02613.60
5.5.330.0050.02114.38
5.5.320.0110.02314.34
5.5.310.0080.02714.21
5.5.300.0060.01213.78
5.5.290.0060.02213.73
5.5.280.0050.02514.31
5.5.270.0070.01514.42
5.5.260.0070.02614.27
5.5.250.0020.01614.30
5.5.240.0070.02414.24
5.5.230.0070.00512.13
5.5.220.0070.00412.22
5.5.210.0050.00612.20
5.5.200.0090.00412.11
5.5.190.0050.00712.14
5.5.180.0060.00612.02
5.5.170.0060.00312.12
5.5.160.0060.00712.13
5.5.150.0060.00512.12
5.5.140.0070.00512.02
5.5.130.0060.00512.19
5.5.120.0080.00712.30
5.5.110.0080.00412.26
5.5.100.0040.00712.21
5.5.90.0060.00412.29
5.5.80.0020.00912.28
5.5.70.0090.00212.27
5.5.60.0050.00412.22
5.5.50.0050.00612.14
5.5.40.0050.00612.16
5.5.30.0060.00412.13
5.5.20.0060.00312.12
5.5.10.0010.00912.09
5.5.00.0070.00412.17

preferences:
58.3 ms | 401 KiB | 5 Q