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) { $array = $newValue; } $lookFor = array_shift($searchPath); if (is_array($array) && array_key_exists($lookFor, $array)) { deepReplace($searchPath, $newValue, $array[$lookFor]); } } print_r($data); deepReplace(array(null, "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.0070.01016.75
8.3.50.0080.00922.06
8.3.40.0070.00718.65
8.3.30.0140.00018.90
8.3.20.0040.00420.38
8.3.10.0080.00023.66
8.3.00.0050.00320.75
8.2.180.0070.01516.38
8.2.170.0110.00722.96
8.2.160.0130.00022.15
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00422.13
8.2.110.0030.00622.13
8.2.100.0080.00317.72
8.2.90.0040.00419.35
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00819.39
8.2.30.0000.00718.12
8.2.20.0000.00717.60
8.2.10.0000.00819.54
8.2.00.0040.00417.70
8.1.280.0070.00725.92
8.1.270.0000.00823.83
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.02
8.1.230.0040.00719.04
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.47
8.1.190.0080.00017.41
8.1.180.0080.00018.10
8.1.170.0030.00518.59
8.1.160.0040.00422.09
8.1.150.0050.00218.61
8.1.140.0000.00717.34
8.1.130.0030.00317.70
8.1.120.0030.00317.42
8.1.110.0000.00817.35
8.1.100.0000.00817.50
8.1.90.0070.00317.39
8.1.80.0000.00717.35
8.1.70.0030.00317.31
8.1.60.0050.00317.47
8.1.50.0040.00417.41
8.1.40.0050.00217.56
8.1.30.0040.00417.50
8.1.20.0040.00417.64
8.1.10.0000.00817.44
8.1.00.0000.00817.47
8.0.300.0000.00718.77
8.0.290.0040.00417.28
8.0.280.0030.00318.49
8.0.270.0000.00717.32
8.0.260.0000.00716.73
8.0.250.0060.00017.01
8.0.240.0070.00016.96
8.0.230.0000.00716.92
8.0.220.0030.00316.94
8.0.210.0040.00416.89
8.0.200.0030.00316.95
8.0.190.0000.00716.94
8.0.180.0040.00416.95
8.0.170.0030.00516.93
8.0.160.0000.00916.88
8.0.150.0040.00416.77
8.0.140.0000.00816.86
8.0.130.0050.00013.33
8.0.120.0040.00416.88
8.0.110.0070.00016.89
8.0.100.0000.00816.84
8.0.90.0040.00416.91
8.0.80.0070.00716.86
8.0.70.0080.00016.72
8.0.60.0040.00416.83
8.0.50.0040.00416.91
8.0.30.0040.01716.93
8.0.20.0120.00617.40
8.0.10.0040.00416.85
8.0.00.0110.00816.64
7.4.330.0060.00015.15
7.4.320.0060.00016.52
7.4.300.0000.00616.61
7.4.290.0030.00316.61
7.4.280.0030.00316.51
7.4.270.0000.00716.40
7.4.260.0000.00716.54
7.4.250.0020.00516.45
7.4.240.0050.00216.64
7.4.230.0000.00716.55
7.4.220.0060.01216.54
7.4.210.0120.00516.60
7.4.200.0000.00716.25
7.4.190.0000.00716.46
7.4.160.0060.00916.42
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0080.00916.41
7.4.120.0090.00916.59
7.4.110.0070.01016.58
7.4.100.0120.00616.58
7.4.90.0070.01016.45
7.4.80.0100.00716.62
7.4.70.0090.00916.58
7.4.60.0120.00416.23
7.4.50.0040.00416.54
7.4.40.0100.00622.77
7.4.30.0030.01316.47
7.4.00.0000.01814.86
7.3.330.0000.00513.28
7.3.320.0030.00313.32
7.3.310.0000.00716.40
7.3.300.0030.00316.29
7.3.290.0030.01116.29
7.3.280.0120.00616.28
7.3.270.0070.01017.40
7.3.260.0030.01616.43
7.3.250.0090.01116.35
7.3.240.0080.01416.50
7.3.230.0100.00616.55
7.3.210.0070.01016.37
7.3.200.0120.00919.39
7.3.190.0130.01016.36
7.3.180.0060.00916.53
7.3.170.0100.00716.53
7.3.160.0090.00616.56
7.3.120.0030.01414.77
7.3.00.0070.01016.44
7.2.330.0030.01416.71
7.2.320.0160.00616.89
7.2.310.0120.00616.76
7.2.300.0140.00616.81
7.2.290.0090.00616.66
7.2.130.0070.00716.90
7.2.120.0130.00416.84
7.2.110.0030.01116.99
7.2.100.0100.00616.83
7.2.90.0090.00616.82
7.2.80.0110.00516.95
7.2.70.0090.00816.86
7.2.60.0050.00916.94
7.2.50.0070.00916.94
7.2.40.0100.00716.91
7.2.30.0110.00116.95
7.2.20.0110.00416.81
7.2.10.0130.00116.91
7.2.00.0050.00717.62
7.1.250.0090.00715.64
7.1.240.0110.00315.76
7.1.230.0120.00415.57
7.1.220.0040.00715.66
7.1.210.0100.00315.73
7.1.200.0090.00315.65
7.1.190.0070.00615.56
7.1.180.0120.00315.68
7.1.170.0020.01215.66
7.1.160.0050.01015.51
7.1.150.0060.00815.87
7.1.140.0110.00415.80
7.1.130.0100.00615.66
7.1.120.0090.00515.64
7.1.110.0080.00815.66
7.1.100.0100.00516.54
7.1.90.0020.00915.75
7.1.80.0070.00715.79
7.1.70.0050.00616.17
7.1.60.0090.00817.00
7.1.50.0080.00916.02
7.1.40.0050.00915.61
7.1.30.0100.00415.51
7.1.20.0050.00915.58
7.1.10.0080.00315.67
7.1.00.0060.03017.98
7.0.330.0070.00915.16
7.0.320.0110.00515.19
7.0.310.0080.00815.39
7.0.300.0070.00915.46
7.0.290.0080.00615.47
7.0.280.0050.01115.38
7.0.270.0070.00515.29
7.0.260.0060.00615.40
7.0.250.0030.00715.31
7.0.240.0070.00715.46
7.0.230.0080.00515.27
7.0.220.0110.00315.33
7.0.210.0100.00415.47
7.0.200.0070.00815.88
7.0.190.0100.00715.34
7.0.180.0060.00715.26
7.0.170.0100.00515.26
7.0.160.0080.00615.28
7.0.150.0080.00615.34
7.0.140.0050.02917.61
7.0.130.0080.00815.29
7.0.120.0060.00315.48
7.0.110.0080.02917.31
7.0.100.0090.02617.38
7.0.90.0090.02817.43
7.0.80.0060.02917.48
7.0.70.0040.02117.43
7.0.60.0050.03217.49
7.0.50.0060.03317.49
7.0.40.0080.02915.57
7.0.30.0080.03015.75
7.0.20.0070.03115.57
7.0.10.0050.03115.68
7.0.00.0020.03515.58
5.6.380.0050.00814.37
5.6.370.0020.01314.17
5.6.360.0080.00514.02
5.6.350.0080.00614.25
5.6.340.0030.00813.99
5.6.330.0080.00814.21
5.6.320.0070.00914.05
5.6.310.0000.01214.29
5.6.300.0050.00713.95
5.6.290.0040.00914.02
5.6.280.0070.02816.48
5.6.270.0070.00714.29
5.6.260.0100.01516.40
5.6.250.0030.03016.31
5.6.240.0020.03616.23
5.6.230.0080.03116.38
5.6.220.0080.03116.25
5.6.210.0080.03016.43
5.6.200.0040.03416.57
5.6.190.0030.03216.54
5.6.180.0050.02916.62
5.6.170.0080.03116.45
5.6.160.0060.03316.40
5.6.150.0070.02916.46
5.6.140.0050.03316.41
5.6.130.0020.02516.45
5.6.120.0040.03516.45
5.6.110.0080.03216.28
5.6.100.0050.03216.54
5.6.90.0040.02916.35
5.6.80.0110.02316.13
5.6.70.0040.03416.41
5.6.60.0060.03316.17
5.6.50.0050.02116.35
5.6.40.0040.03416.23
5.6.30.0030.03216.19
5.6.20.0050.02916.19
5.6.10.0050.02916.22
5.6.00.0030.03516.25
5.5.380.0040.02714.07
5.5.370.0020.03414.31
5.5.360.0050.03014.08
5.5.350.0060.03114.29
5.5.340.0040.02214.20
5.5.330.0040.03214.29
5.5.320.0010.02814.28
5.5.310.0040.03014.34
5.5.300.0030.02914.36
5.5.290.0070.02814.44
5.5.280.0040.02914.22
5.5.270.0050.03014.39
5.5.260.0040.02514.21
5.5.250.0030.03314.28
5.5.240.0040.03114.11
5.5.230.0060.03114.09
5.5.220.0090.02414.05
5.5.210.0070.02814.06
5.5.200.0050.03114.11
5.5.190.0030.03214.02
5.5.180.0010.03214.10
5.5.170.0040.00811.04
5.5.160.0030.02914.09
5.5.150.0030.02914.05
5.5.140.0070.02913.90
5.5.130.0030.03314.04
5.5.120.0010.02714.14
5.5.110.0040.02914.01
5.5.100.0050.03113.93
5.5.90.0060.03014.13
5.5.80.0040.03213.99
5.5.70.0060.02714.09
5.5.60.0050.02714.02
5.5.50.0040.03013.99
5.5.40.0040.03114.14
5.5.30.0050.02714.16
5.5.20.0000.03114.11
5.5.10.0060.02813.99
5.5.00.0080.02814.11
5.4.450.0060.03113.91
5.4.440.0020.03313.76
5.4.430.0030.02513.76
5.4.420.0010.02613.94
5.4.410.0030.02513.71
5.4.400.0070.02713.62
5.4.390.0040.03113.52
5.4.380.0070.02713.62
5.4.370.0060.02813.57
5.4.360.0040.02813.67
5.4.350.0050.02613.71
5.4.340.0060.02613.69
5.4.330.0070.00510.89
5.4.320.0090.02513.56
5.4.310.0040.01613.75
5.4.300.0070.02413.51
5.4.290.0020.03013.70
5.4.280.0070.02613.64
5.4.270.0070.02513.67
5.4.260.0010.03013.65
5.4.250.0050.02613.65
5.4.240.0030.02213.72
5.4.230.0000.03213.66
5.4.220.0080.02713.70
5.4.210.0050.02713.62
5.4.200.0060.02813.57
5.4.190.0030.01913.68
5.4.180.0060.03013.56
5.4.170.0050.02713.74
5.4.160.0020.02513.68
5.4.150.0070.02713.50
5.4.140.0020.03312.92
5.4.130.0050.01612.59
5.4.120.0050.02612.75
5.4.110.0060.02912.72
5.4.100.0060.02812.75
5.4.90.0020.02812.77
5.4.80.0050.02612.63
5.4.70.0050.02612.76
5.4.60.0050.01912.67
5.4.50.0050.02812.82
5.4.40.0040.03012.60
5.4.30.0010.02212.86
5.4.20.0090.02512.81
5.4.10.0050.02712.76
5.4.00.0040.02812.62
5.3.290.0050.02211.99
5.3.280.0030.02811.94
5.3.270.0010.02811.85
5.3.260.0080.02811.96
5.3.250.0030.02812.01
5.3.240.0030.02911.83
5.3.230.0050.02511.90
5.3.220.0080.01411.67
5.3.210.0040.02711.79
5.3.200.0040.01911.79
5.3.190.0010.02811.92
5.3.180.0030.02911.98
5.3.170.0040.01911.97
5.3.160.0040.02711.89
5.3.150.0040.02711.95
5.3.140.0060.02411.97
5.3.130.0070.01711.97
5.3.120.0040.02611.96
5.3.110.0060.02711.84
5.3.100.0100.02211.68
5.3.90.0040.02711.64
5.3.80.0040.02711.62
5.3.70.0050.02811.52
5.3.60.0000.02811.80
5.3.50.0020.03011.57
5.3.40.0060.01711.51
5.3.30.0020.02411.69
5.3.20.0040.02811.51
5.3.10.0040.02411.31
5.3.00.0040.02711.33
5.2.170.0040.02310.80
5.2.160.0030.02110.91
5.2.150.0020.02710.94
5.2.140.0030.02310.87
5.2.130.0040.02210.79
5.2.120.0040.02210.92
5.2.110.0030.02010.87
5.2.100.0060.02010.90
5.2.90.0040.01910.90
5.2.80.0040.02410.79
5.2.70.0020.02610.83
5.2.60.0060.02110.81
5.2.50.0030.01410.82
5.2.40.0070.02010.79
5.2.30.0030.02610.84
5.2.20.0030.02410.84
5.2.10.0040.02410.79
5.2.00.0050.02210.79
5.1.60.0020.01410.79
5.1.50.0040.01910.79
5.1.40.0020.01110.79
5.1.30.0020.02310.79
5.1.20.0040.02010.79
5.1.10.0020.02210.79
5.1.00.0030.02110.79
5.0.50.0030.01110.79
5.0.40.0040.01510.79
5.0.30.0030.01610.79
5.0.20.0020.00910.79
5.0.10.0030.01210.79
5.0.00.0050.01010.79
4.4.90.0020.00710.79
4.4.80.0020.01710.79
4.4.70.0040.00910.79
4.4.60.0010.01410.79
4.4.50.0020.01110.79
4.4.40.0020.02110.79
4.4.30.0060.00910.79
4.4.20.0020.01410.79
4.4.10.0040.00710.79
4.4.00.0020.01510.79
4.3.110.0020.00810.79
4.3.100.0020.00510.79
4.3.90.0030.00610.79
4.3.80.0020.01010.79
4.3.70.0000.00910.79
4.3.60.0000.01110.79
4.3.50.0030.00510.79
4.3.40.0020.00810.79
4.3.30.0040.00610.79
4.3.20.0000.00910.79
4.3.10.0030.00710.79
4.3.00.0040.00910.79

preferences:
43.89 ms | 401 KiB | 5 Q