3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('element1' => array('subelement1'=>'value','subelement2'=>array('sub21'=>'hello')), 'element2'=>array('something'=>'this','subelement1'=>'awesome','subelement2'=>array('sub21'=>'world'))); function deepReplace($searchPath, $newValue, &$array) { if (count($searchPath) == 0) return; /*else if (count($searchPath) == 1) { $array = $newValue; }*/ $lookFor = array_shift($searchPath); /*if ($lookFor === null) { foreach ($array as &$value) { if (is_array($value)) deepReplace($searchPath, $newValue, $value); } } else*/ if (is_array($array) && array_key_exists($lookFor, $array)) { deepReplace($searchPath, $newValue, $array[$lookFor]); } var_dump($searchPath); } //print_r($data); deepReplace(array("element1", "subelement1"), "newValue", $data); //print_r($data);

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.0150.00616.63
8.3.50.0080.01022.18
8.3.40.0140.00018.73
8.3.30.0070.00719.21
8.3.20.0050.00320.29
8.3.10.0040.00423.61
8.3.00.0040.00420.78
8.2.180.0190.00316.62
8.2.170.0070.00722.96
8.2.160.0100.00322.08
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0040.00422.20
8.2.110.0030.00622.11
8.2.100.0030.01017.84
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0040.00419.37
8.2.30.0000.00818.18
8.2.20.0050.00317.79
8.2.10.0040.00417.63
8.2.00.0000.00717.66
8.1.280.0090.00925.92
8.1.270.0000.00823.82
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.87
8.1.230.0000.01019.14
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0030.00517.53
8.1.180.0060.00318.10
8.1.170.0030.00618.46
8.1.160.0000.00721.95
8.1.150.0000.00818.56
8.1.140.0050.00217.46
8.1.130.0000.00817.78
8.1.120.0030.00517.48
8.1.110.0070.00017.45
8.1.100.0040.00317.36
8.1.90.0000.00717.36
8.1.80.0030.00317.54
8.1.70.0040.00417.39
8.1.60.0060.00617.47
8.1.50.0040.00417.43
8.1.40.0030.00517.57
8.1.30.0050.00317.53
8.1.20.0000.00817.75
8.1.10.0070.00017.58
8.1.00.0020.00517.51
8.0.300.0050.00318.77
8.0.290.0000.00717.18
8.0.280.0040.00418.33
8.0.270.0000.00717.18
8.0.260.0030.00316.84
8.0.250.0000.00716.97
8.0.240.0030.00316.94
8.0.230.0030.00316.96
8.0.220.0030.00316.88
8.0.210.0040.00416.89
8.0.200.0100.00016.91
8.0.190.0080.00017.00
8.0.180.0000.00716.83
8.0.170.0030.00516.88
8.0.160.0070.00016.90
8.0.150.0000.00716.93
8.0.140.0040.00416.87
8.0.130.0050.00013.26
8.0.120.0050.00216.82
8.0.110.0000.00716.84
8.0.100.0080.00016.87
8.0.90.0040.00416.92
8.0.80.0070.00716.96
8.0.70.0040.00416.95
8.0.60.0050.00216.77
8.0.50.0000.00716.77
8.0.30.0080.01117.15
8.0.20.0080.01017.40
8.0.10.0000.00716.80
8.0.00.0100.01116.65
7.4.330.0050.00015.00
7.4.320.0070.00016.62
7.4.300.0000.00716.60
7.4.290.0070.00016.65
7.4.280.0030.00316.54
7.4.270.0030.00316.50
7.4.260.0030.00316.50
7.4.250.0070.00016.50
7.4.240.0050.00316.57
7.4.230.0030.00316.42
7.4.220.0070.01016.58
7.4.210.0030.01116.59
7.4.200.0000.00716.37
7.4.190.0000.00716.71
7.4.160.0060.01016.46
7.4.150.0110.01117.40
7.4.140.0100.00817.86
7.4.130.0080.01116.64
7.4.120.0100.00816.45
7.4.110.0070.01016.63
7.4.100.0150.00416.37
7.4.90.0090.00916.44
7.4.80.0100.00616.44
7.4.70.0100.01016.43
7.4.60.0030.01316.55
7.4.50.0030.00616.67
7.4.40.0090.00922.77
7.4.30.0130.00316.70
7.4.00.0070.00714.84
7.3.330.0000.00513.38
7.3.320.0000.00513.19
7.3.310.0030.00316.33
7.3.300.0000.00716.29
7.3.290.0050.00916.39
7.3.280.0070.01016.37
7.3.270.0120.01217.40
7.3.260.0150.00416.32
7.3.250.0120.00916.41
7.3.240.0100.00716.37
7.3.230.0030.01316.39
7.3.210.0110.00716.49
7.3.200.0030.01819.39
7.3.190.0040.01416.38
7.3.180.0070.01416.39
7.3.170.0060.00916.38
7.3.160.0130.00316.44
7.3.120.0110.00314.95
7.3.00.0080.00416.73
7.2.330.0060.01216.69
7.2.320.0120.01216.72
7.2.310.0130.00916.61
7.2.300.0150.00616.67
7.2.290.0050.01116.55
7.2.130.0070.01017.08
7.2.120.0210.00316.98
7.2.110.0060.01217.04
7.2.100.0000.01516.69
7.2.90.0100.00716.93
7.2.80.0070.00717.00
7.2.70.0130.00016.97
7.2.60.0030.01016.90
7.2.50.0040.01116.70
7.2.40.0060.00916.88
7.2.30.0120.00616.80
7.2.20.0060.01116.74
7.2.10.0030.00617.20
7.2.00.0030.00918.08
7.1.250.0100.01015.82
7.1.240.0070.00715.56
7.1.230.0000.02015.65
7.1.220.0070.01515.70
7.1.210.0030.01215.66
7.1.200.0080.00315.62
7.1.190.0130.00315.69
7.1.180.0040.01115.42
7.1.170.0080.00815.97
7.1.160.0070.01315.81
7.1.150.0080.00815.68
7.1.140.0060.01015.92
7.1.130.0070.00715.70
7.1.120.0070.00715.45
7.1.110.0030.00615.87
7.1.100.0060.00517.07
7.1.90.0140.00015.52
7.1.80.0130.00015.82
7.1.70.0060.00616.38
7.1.60.0040.01517.50
7.1.50.0070.01016.34
7.1.40.0140.00015.34
7.1.30.0120.00315.72
7.1.20.0100.00315.57
7.1.10.0070.00315.96
7.1.00.0050.04019.22
7.0.330.0100.00315.34
7.0.320.0200.00015.22
7.0.310.0040.01115.38
7.0.300.0030.01015.55
7.0.290.0090.00615.44
7.0.280.0110.00615.45
7.0.270.0030.00715.20
7.0.260.0000.01215.29
7.0.250.0150.00015.48
7.0.240.0000.01215.47
7.0.230.0070.00015.11
7.0.220.0070.00715.22
7.0.210.0030.00715.46
7.0.200.0090.00715.97
7.0.190.0060.00615.21
7.0.180.0030.00715.21
7.0.170.0080.00515.52
7.0.160.0100.00015.33
7.0.150.0090.00415.63
7.0.140.0050.03818.74
7.0.130.0030.00815.34
7.0.120.0070.00715.28
7.0.110.0090.00615.51
7.0.100.0030.01015.18
7.0.90.0100.00315.15
7.0.80.0000.01015.55
7.0.70.0060.00615.59
7.0.60.0130.04117.67
7.0.50.0070.03516.72
7.0.40.0070.04616.82
7.0.30.0150.02416.65
7.0.20.0180.04516.65
7.0.10.0100.04016.76
7.0.00.0030.02316.93
5.6.380.0040.00714.66
5.6.370.0030.00914.25
5.6.360.0040.01214.55
5.6.350.0030.01714.70
5.6.340.0100.00714.29
5.6.330.0040.01114.13
5.6.320.0030.01014.36
5.6.310.0030.01314.40
5.6.300.0080.00414.67
5.6.290.0100.00314.36
5.6.280.0050.04017.77
5.6.270.0070.00714.54
5.6.260.0070.00714.27
5.6.250.0000.01114.34
5.6.240.0090.00614.21
5.6.230.0040.01114.40
5.6.220.0030.01014.38
5.6.210.0100.04117.63
5.6.200.0050.03216.26
5.6.190.0050.04917.38
5.6.180.0250.03517.45
5.6.170.0130.03117.59
5.6.160.0050.02217.35
5.6.150.0030.04416.23
5.6.140.0100.04316.31
5.6.130.0070.04216.33
5.6.120.0040.04917.72
5.6.110.0080.04517.66
5.6.100.0140.03717.64
5.6.90.0060.04417.56
5.6.80.0030.03417.22
5.6.70.0200.03817.34
5.6.60.0000.01114.57
5.6.50.0040.00714.23
5.6.40.0000.01214.48
5.6.30.0080.00814.42
5.6.20.0100.00714.12
5.6.10.0060.00614.23
5.6.00.0000.01114.37
5.5.380.0000.00611.37
5.5.370.0050.00211.18
5.5.360.0000.00611.33
5.5.350.0000.03215.85
5.5.340.0070.04414.57
5.5.330.0020.03415.68
5.5.320.0070.02215.90
5.5.310.0130.02315.76
5.5.300.0100.03814.62
5.5.290.0050.03814.65
5.5.280.0050.02716.01
5.5.270.0070.02015.93
5.5.260.0070.03516.14
5.5.250.0070.04215.86
5.5.240.0080.04115.70
5.5.230.0030.00311.18
5.5.220.0050.00211.18
5.5.210.0080.00311.21
5.5.200.0050.00211.20
5.5.190.0040.00411.38
5.5.180.0060.00311.18
5.5.170.0000.00811.18
5.5.160.0070.00011.20
5.5.150.0030.00611.18
5.5.140.0040.00411.18
5.5.130.0060.00311.18
5.5.120.0030.00611.39
5.5.110.0090.00011.18
5.5.100.0030.00611.18
5.5.90.0070.00311.27
5.5.80.0030.00711.22
5.5.70.0000.00711.18
5.5.60.0040.00411.18
5.5.50.0000.00811.18
5.5.40.0000.00711.18
5.5.30.0050.00311.18
5.5.20.0040.00711.18
5.5.10.0030.00611.32
5.5.00.0030.00511.18
5.4.450.0380.02115.19
5.4.440.0110.03315.36
5.4.430.0150.02715.39
5.4.420.0190.03015.31
5.4.410.0130.02815.10
5.4.400.0050.03014.98
5.4.390.0120.02514.99
5.4.380.0100.03015.01
5.4.370.0140.02514.99
5.4.360.0130.02614.97
5.4.350.0150.03014.87
5.4.340.0190.02815.04
5.4.330.0020.00511.18
5.4.320.0060.02111.84
5.4.310.0070.02011.84
5.4.300.0030.02511.84
5.4.290.0040.02211.84
5.4.280.0080.03111.77
5.4.270.0100.03411.82
5.4.260.0080.03511.77
5.4.250.0100.03311.77
5.4.240.0090.02611.77
5.4.230.0150.04111.77
5.4.220.0070.03111.77
5.4.210.0070.03411.77
5.4.200.0080.03811.77
5.4.190.0040.03811.79
5.4.180.0080.04311.77
5.4.170.0050.04211.77
5.4.160.0100.02811.77
5.4.150.0090.03511.77
5.4.140.0070.03711.61
5.4.130.0060.02711.63
5.4.120.0040.04411.58
5.4.110.0070.02511.58
5.4.100.0050.02811.64
5.4.90.0020.03611.58
5.4.80.0070.04011.58
5.4.70.0050.04511.58
5.4.60.0080.03011.58
5.4.50.0100.03611.58
5.4.40.0090.03311.57
5.4.30.0050.03111.57
5.4.20.0100.04711.57
5.4.10.0090.03411.57
5.4.00.0060.03011.33
5.3.290.0040.02411.99
5.3.280.0060.02011.94
5.3.270.0060.02211.95
5.3.260.0020.02911.95
5.3.250.0070.02411.95
5.3.240.0050.02411.95
5.3.230.0040.03211.94
5.3.220.0110.03511.93
5.3.210.0080.04811.93
5.3.200.0090.04911.93
5.3.190.0060.03711.93
5.3.180.0060.03211.93
5.3.170.0110.03111.92
5.3.160.0080.03911.92
5.3.150.0080.04111.93
5.3.140.0100.04411.92
5.3.130.0110.04611.92
5.3.120.0150.04611.92
5.3.110.0080.03511.92
5.3.100.0080.03011.65
5.3.90.0080.03311.63
5.3.80.0060.03611.63
5.3.70.0110.03811.62
5.3.60.0050.03511.62
5.3.50.0130.04811.59
5.3.40.0040.03211.59
5.3.30.0060.02511.56
5.3.20.0050.02511.46
5.3.10.0070.02311.44
5.3.00.0070.02611.43
5.2.170.0090.03010.18
5.2.160.0080.02710.18
5.2.150.0030.03110.18
5.2.140.0090.02810.18
5.2.130.0070.03610.16
5.2.120.0120.03810.16
5.2.110.0050.04410.17
5.2.100.0080.03510.16
5.2.90.0090.03510.16
5.2.80.0100.03910.16
5.2.70.0100.03410.16
5.2.60.0070.03610.13
5.2.50.0070.03810.12
5.2.40.0070.04410.11
5.2.30.0060.03410.10
5.2.20.0090.02710.09
5.2.10.0060.02710.05
5.2.00.0030.0299.98
5.1.60.0040.0249.62
5.1.50.0060.0299.62
5.1.40.0040.0319.62
5.1.30.0040.0259.79
5.1.20.0080.0229.80
5.1.10.0070.0459.66
5.1.00.0080.0229.66
5.0.50.0070.0238.90
5.0.40.0010.0158.83
5.0.30.0070.0168.74
5.0.20.0020.0138.72
5.0.10.0040.0158.71
5.0.00.0050.0228.71
4.4.90.0020.0157.98
4.4.80.0040.0137.96
4.4.70.0020.0157.96
4.4.60.0030.0127.97
4.4.50.0040.0137.97
4.4.40.0040.0187.94
4.4.30.0050.0117.97
4.4.20.0020.0168.01
4.4.10.0020.0118.01
4.4.00.0040.0157.97
4.3.110.0040.0137.92
4.3.100.0030.0097.92
4.3.90.0020.0117.91
4.3.80.0040.0147.88
4.3.70.0030.0087.90
4.3.60.0030.0117.90
4.3.50.0040.0107.90
4.3.40.0020.0207.86
4.3.30.0010.0147.23
4.3.20.0020.0217.23
4.3.10.0030.0227.21
4.3.00.0130.01012.41

preferences:
42.32 ms | 401 KiB | 5 Q