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.0140.00416.75
8.3.50.0180.00421.99
8.3.40.0060.01018.92
8.3.30.0030.01018.79
8.3.20.0000.00820.16
8.3.10.0000.00823.44
8.3.00.0090.00019.50
8.2.180.0090.00925.92
8.2.170.0110.00322.96
8.2.160.0120.00321.93
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00017.75
8.2.120.0040.00426.16
8.2.110.0110.00019.21
8.2.100.0060.00617.92
8.2.90.0030.00519.01
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0000.00819.41
8.2.30.0030.00620.67
8.2.20.0050.00317.71
8.2.10.0070.00018.08
8.2.00.0030.00518.02
8.1.280.0070.01125.92
8.1.270.0000.00823.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00719.54
8.1.230.0090.00317.79
8.1.220.0000.00817.78
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.13
8.1.180.0030.00618.10
8.1.170.0000.00819.02
8.1.160.0040.00421.94
8.1.150.0000.00718.86
8.1.140.0080.00019.52
8.1.130.0030.00317.65
8.1.120.0030.00517.48
8.1.110.0030.00617.51
8.1.100.0040.00417.48
8.1.90.0000.00817.55
8.1.80.0030.00617.54
8.1.70.0050.00217.36
8.1.60.0040.00417.52
8.1.50.0050.00317.61
8.1.40.0000.00917.57
8.1.30.0080.00017.65
8.1.20.0000.00817.69
8.1.10.0030.00517.59
8.1.00.0020.00817.46
8.0.300.0040.00418.77
8.0.290.0050.00216.88
8.0.280.0030.00318.42
8.0.270.0030.00316.92
8.0.260.0040.00417.28
8.0.250.0030.00517.07
8.0.240.0060.00317.10
8.0.230.0070.00016.96
8.0.220.0030.00416.89
8.0.210.0000.00716.88
8.0.200.0030.00317.07
8.0.190.0030.00616.97
8.0.180.0020.00517.07
8.0.170.0040.00416.93
8.0.160.0050.00317.04
8.0.150.0030.00616.93
8.0.140.0000.00816.90
8.0.130.0050.00013.50
8.0.120.0030.00617.04
8.0.110.0000.00717.00
8.0.100.0000.00716.99
8.0.90.0000.00817.10
8.0.80.0060.00917.05
8.0.70.0080.00017.09
8.0.60.0000.00816.89
8.0.50.0030.00617.02
8.0.30.0060.01317.13
8.0.20.0070.01117.40
8.0.10.0000.00717.13
8.0.00.0070.01216.79
7.4.330.0000.00515.15
7.4.320.0030.00316.63
7.4.300.0000.00716.63
7.4.290.0000.00716.65
7.4.280.0040.00416.57
7.4.270.0000.00716.55
7.4.260.0070.00016.59
7.4.250.0040.00416.50
7.4.240.0060.00216.62
7.4.230.0030.00316.42
7.4.220.0060.01216.70
7.4.210.0000.01616.60
7.4.200.0070.00016.36
7.4.160.0060.01016.48
7.4.150.0070.01117.40
7.4.140.0120.00617.86
7.4.130.0060.01316.52
7.4.120.0100.00716.58
7.4.110.0110.01016.35
7.4.100.0120.01116.50
7.4.90.0060.01216.57
7.4.80.0160.01219.39
7.4.70.0030.01216.51
7.4.60.0090.00616.50
7.4.50.0000.01616.67
7.4.40.0100.00616.50
7.4.30.0040.01416.57
7.4.10.0140.00315.00
7.4.00.0070.00914.80
7.3.330.0000.00513.32
7.3.320.0060.00013.39
7.3.310.0030.00316.45
7.3.300.0000.00716.47
7.3.290.0080.01116.44
7.3.280.0120.00916.45
7.3.270.0150.00917.40
7.3.260.0210.00616.44
7.3.250.0090.00816.62
7.3.240.0100.00716.44
7.3.230.0140.00416.53
7.3.210.0100.00716.52
7.3.200.0030.01316.46
7.3.190.0060.01116.70
7.3.180.0040.01216.38
7.3.170.0100.00716.59
7.3.160.0150.00616.53
7.3.130.0070.01115.12
7.3.120.0120.00615.07
7.3.110.0090.00615.11
7.3.100.0030.00914.67
7.3.90.0070.00714.63
7.3.80.0040.01114.96
7.3.70.0030.00915.05
7.3.60.0000.01014.98
7.3.50.0030.01014.77
7.3.40.0000.01714.75
7.3.30.0100.00314.98
7.3.20.0080.00816.71
7.3.10.0090.00316.88
7.3.00.0070.00716.80
7.2.330.0120.00616.70
7.2.320.0070.01016.71
7.2.310.0080.00816.68
7.2.300.0140.00716.68
7.2.290.0180.00316.72
7.2.260.0060.01215.27
7.2.250.0140.00415.26
7.2.240.0100.00715.13
7.2.230.0150.00015.02
7.2.220.0030.01615.10
7.2.210.0080.00815.16
7.2.200.0030.01015.23
7.2.190.0040.01215.29
7.2.180.0070.01014.99
7.2.170.0090.00315.17
7.2.160.0000.00915.25
7.2.150.0100.00316.69
7.2.140.0100.00617.07
7.2.130.0060.01216.98
7.2.120.0090.00316.98
7.2.110.0000.01716.96
7.2.100.0040.01117.18
7.2.90.0090.00616.75
7.2.80.0060.01016.66
7.2.70.0000.01116.80
7.2.60.0050.00916.83
7.2.50.0040.00716.91
7.2.40.0090.00617.04
7.2.30.0070.00716.69
7.2.20.0030.01316.86
7.2.10.0050.00517.07
7.2.00.0030.01118.20
7.1.330.0000.01315.57
7.1.320.0110.00715.86
7.1.310.0040.00815.79
7.1.300.0030.00615.92
7.1.290.0040.01115.79
7.1.280.0060.00615.60
7.1.270.0050.00515.48
7.1.260.0120.00415.80
7.1.250.0060.00615.79
7.1.240.0060.00615.60
7.1.230.0070.00715.52
7.1.220.0070.01015.92
7.1.210.0000.01415.79
7.1.200.0020.01015.75
7.1.190.0060.00315.71
7.1.180.0030.01015.48
7.1.170.0070.00315.75
7.1.160.0030.00915.71
7.1.150.0060.00315.62
7.1.140.0100.00615.86
7.1.130.0000.00815.63
7.1.120.0070.01015.90
7.1.110.0030.00915.79
7.1.100.0020.01317.06
7.1.90.0060.00915.69
7.1.80.0030.00715.64
7.1.70.0020.00916.27
7.1.60.0070.00917.64
7.1.50.0040.01116.34
7.1.40.0030.01015.79
7.1.30.0000.01215.84
7.1.20.0080.00415.86
7.1.10.0040.00715.72
7.1.00.0030.04419.09
7.0.330.0090.00315.37
7.0.320.0060.00315.43
7.0.310.0060.00615.64
7.0.300.0080.00615.56
7.0.290.0030.00614.89
7.0.280.0040.01115.12
7.0.270.0030.01015.43
7.0.260.0060.00915.29
7.0.250.0090.00315.56
7.0.240.0030.01015.61
7.0.230.0030.01015.64
7.0.220.0080.00315.49
7.0.210.0110.00315.61
7.0.200.0070.00316.20
7.0.190.0040.00815.50
7.0.180.0030.01015.32
7.0.170.0120.00315.19
7.0.160.0070.00315.57
7.0.150.0060.00615.34
7.0.140.0040.00815.25
7.0.130.0000.00815.54
7.0.120.0030.00915.30
7.0.110.0060.00315.41
7.0.100.0030.00915.54
7.0.90.0070.00315.24
7.0.80.0060.00915.17
7.0.70.0100.00315.35
7.0.60.0030.04217.80
7.0.50.0070.04316.77
7.0.40.0070.02816.92
7.0.30.0070.04716.80
7.0.20.0190.02116.88
7.0.10.0030.02516.78
7.0.00.0100.03216.93
5.6.400.0070.00714.31
5.6.390.0040.00714.53
5.6.380.0060.00914.67
5.6.370.0090.00014.77
5.6.360.0030.01014.34
5.6.350.0040.00814.68
5.6.340.0000.01414.37
5.6.330.0120.00314.24
5.6.320.0030.01014.19
5.6.310.0060.00914.38
5.6.300.0060.00314.57
5.6.290.0030.00814.27
5.6.280.0060.01817.65
5.6.270.0040.01114.44
5.6.260.0000.01014.41
5.6.250.0060.00314.45
5.6.240.0110.00314.45
5.6.230.0030.01314.50
5.6.220.0000.00914.35
5.6.210.0070.03917.59
5.6.200.0110.02216.43
5.6.190.0030.04817.49
5.6.180.0080.02717.33
5.6.170.0150.04317.47
5.6.160.0110.03917.36
5.6.150.0080.04016.28
5.6.140.0070.04316.34
5.6.130.0080.04316.30
5.6.120.0070.05217.78
5.6.110.0030.04817.79
5.6.100.0040.02417.80
5.6.90.0050.04217.73
5.6.80.0090.04017.40
5.6.70.0000.01014.41
5.6.60.0030.01014.33
5.6.50.0030.00714.34
5.6.40.0070.00714.28
5.6.30.0000.00914.21
5.6.20.0030.01214.23
5.6.10.0100.00614.25
5.6.00.0070.00714.40
5.5.380.0100.00014.33
5.5.370.0130.00314.20
5.5.360.0000.00814.23
5.5.350.2150.02717.32
5.5.340.0020.02716.05
5.5.330.0070.04217.31
5.5.320.0200.03817.39
5.5.310.0170.03517.27
5.5.300.0190.03016.10
5.5.290.0130.03616.10
5.5.280.0070.02517.46
5.5.270.0030.02317.62
5.5.260.0030.04417.70
5.5.250.0030.05017.43
5.5.240.0120.04017.30
5.5.230.0030.00714.19
5.5.220.0090.00314.04
5.5.210.0080.00614.35
5.5.200.0060.00314.13
5.5.190.0150.00314.28
5.5.180.0130.00014.16
5.5.170.0030.01314.49
5.5.160.0030.01414.21
5.5.150.0040.00714.55
5.5.140.0090.00613.75
5.5.130.0070.00314.15
5.5.120.0030.00914.25
5.5.110.0090.00614.02
5.5.100.0070.00314.06
5.5.90.0120.00014.16
5.5.80.0000.01313.99
5.5.70.0070.00713.95
5.5.60.0000.00914.14
5.5.50.0030.01014.16
5.5.40.0030.01014.29
5.5.30.0070.00314.45
5.5.20.0090.00014.21
5.5.10.0080.00414.35
5.5.00.0040.01113.80

preferences:
61.16 ms | 401 KiB | 5 Q