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; $lookFor = array_shift($searchPath); var_dump($lookFor); if (is_array($array) && array_key_exists($lookFor, $array)) { deepReplace($searchPath, $newValue, $array[$lookFor]); } } //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.0100.01016.50
8.3.50.0060.01121.97
8.3.40.0070.00718.73
8.3.30.0070.01019.22
8.3.20.0040.00420.27
8.3.10.0000.00823.61
8.3.00.0040.00420.77
8.2.180.0170.00316.50
8.2.170.0110.00422.96
8.2.160.0140.00022.14
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00822.19
8.2.110.0060.00321.96
8.2.100.0090.00317.82
8.2.90.0000.00819.15
8.2.80.0030.00618.04
8.2.70.0030.00617.63
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0040.00419.34
8.2.30.0000.00718.14
8.2.20.0040.00417.73
8.2.10.0000.00819.44
8.2.00.0000.00717.64
8.1.280.0100.00725.92
8.1.270.0080.00023.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0180.00423.72
8.1.230.0060.00619.21
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0060.00617.35
8.1.190.0050.00317.39
8.1.180.0060.00318.10
8.1.170.0060.00318.66
8.1.160.0030.00322.01
8.1.150.0080.00018.70
8.1.140.0040.00417.42
8.1.130.0000.00717.80
8.1.120.0000.00717.33
8.1.110.0070.00017.42
8.1.100.0040.00417.39
8.1.90.0050.00517.47
8.1.80.0000.00717.47
8.1.70.0050.00317.25
8.1.60.0000.00817.61
8.1.50.0060.00317.48
8.1.40.0000.00717.43
8.1.30.0060.00317.59
8.1.20.0000.00717.73
8.1.10.0000.00817.54
8.1.00.0070.00017.54
8.0.300.0050.00318.77
8.0.290.0070.00017.04
8.0.280.0070.00018.51
8.0.270.0070.00017.33
8.0.260.0000.00716.79
8.0.250.0030.00316.97
8.0.240.0030.00616.86
8.0.230.0000.00716.90
8.0.220.0070.00016.91
8.0.210.0040.00416.93
8.0.200.0070.00316.98
8.0.190.0000.00916.97
8.0.180.0000.00816.80
8.0.170.0000.00916.91
8.0.160.0000.00716.90
8.0.150.0070.00016.81
8.0.140.0000.00816.84
8.0.130.0000.00613.35
8.0.120.0040.00416.79
8.0.110.0070.00016.81
8.0.100.0040.00416.89
8.0.90.0000.00717.02
8.0.80.0100.00516.96
8.0.70.0040.00416.96
8.0.60.0040.00416.90
8.0.50.0070.00016.93
8.0.30.0060.01217.18
8.0.20.0120.00717.40
8.0.10.0070.00017.07
8.0.00.0090.01216.78
7.4.330.0000.00515.00
7.4.320.0030.00316.51
7.4.300.0000.00616.61
7.4.290.0030.00316.60
7.4.280.0030.00316.49
7.4.270.0050.00316.63
7.4.260.0040.00416.61
7.4.250.0000.00716.40
7.4.240.0020.00516.48
7.4.230.0040.00416.64
7.4.220.0060.01216.56
7.4.210.0100.00816.58
7.4.200.0050.00316.72
7.4.190.0030.00316.70
7.4.160.0030.01316.51
7.4.150.0060.01217.40
7.4.140.0110.00817.86
7.4.130.0170.00016.46
7.4.120.0120.00516.44
7.4.110.0080.00816.46
7.4.100.0110.00816.49
7.4.90.0100.00716.36
7.4.80.0070.01016.62
7.4.70.0090.00916.47
7.4.60.0030.01416.73
7.4.50.0040.00416.20
7.4.40.0030.01022.77
7.4.30.0060.01116.49
7.4.00.0080.00414.95
7.3.330.0050.00013.41
7.3.320.0000.00513.30
7.3.310.0000.00716.41
7.3.300.0000.00716.42
7.3.290.0090.00616.30
7.3.280.0070.01016.37
7.3.270.0030.01317.40
7.3.260.0150.00916.50
7.3.250.0140.00416.58
7.3.240.0140.00316.45
7.3.230.0130.00316.45
7.3.210.0070.01016.56
7.3.200.0120.00619.39
7.3.190.0030.01916.46
7.3.180.0070.01016.47
7.3.170.0090.00616.41
7.3.160.0160.00016.37
7.3.120.0000.01715.01
7.2.330.0100.00716.75
7.2.320.0030.01916.82
7.2.310.0130.00916.79
7.2.300.0090.01516.85
7.2.290.0080.00816.58
7.2.00.0150.00818.90
7.1.100.0060.00618.06
7.1.70.0000.00717.06
7.1.60.0070.01719.29
7.1.50.0030.02016.84
7.1.00.0130.06722.46
7.0.200.0120.00416.80
7.0.140.0000.07722.12
7.0.60.0400.07020.03
7.0.50.0100.08317.88
7.0.40.0070.05020.18
7.0.30.0300.04720.20
7.0.20.0270.08020.16
7.0.10.0100.06020.11
7.0.00.0030.06720.09
5.6.280.0070.07020.90
5.6.210.0130.06020.65
5.6.200.0000.06018.18
5.6.190.0030.06320.65
5.6.180.0270.08320.63
5.6.170.0330.06020.48
5.6.160.0100.05720.47
5.6.150.0000.08718.21
5.6.140.0070.08318.18
5.6.130.0030.06018.14
5.6.120.0170.07721.09
5.6.110.0170.07721.14
5.6.100.0130.06021.11
5.6.90.0070.08720.99
5.6.80.0130.05720.45
5.5.350.0030.08320.44
5.5.340.0030.08318.07
5.5.330.0000.09320.40
5.5.320.0100.08020.34
5.5.310.0400.07020.32
5.5.300.0100.07318.08
5.5.290.0100.07717.97
5.5.280.0130.07720.66
5.5.270.0100.04020.95
5.5.260.0030.08320.80
5.5.250.0030.04020.58
5.5.240.0000.03320.20
5.4.450.0430.05319.46
5.4.440.0900.05019.62
5.4.430.0400.06719.59
5.4.420.0630.05719.30
5.4.410.0930.05719.25
5.4.400.1100.05019.13
5.4.390.1100.06019.06
5.4.380.0130.05318.63
5.4.370.0100.05718.78
5.4.360.0200.04718.81
5.4.350.0130.05718.76
5.4.340.0100.05718.73
5.4.320.0060.03812.50
5.4.310.0040.04012.50
5.4.300.0040.03812.51
5.4.290.0070.03812.50
5.4.280.0130.04312.37
5.4.270.0090.04312.37
5.4.260.0130.05112.38
5.4.250.0080.05712.37
5.4.240.0160.04912.37
5.4.230.0140.07012.36
5.4.220.0060.04512.36
5.4.210.0090.03912.37
5.4.200.0080.04812.37
5.4.190.0170.06112.36
5.4.180.0120.06112.36
5.4.170.0170.05712.37
5.4.160.0080.04012.36
5.4.150.0100.04612.36
5.4.140.0090.06312.04
5.4.130.0120.04212.03
5.4.120.0100.05611.98
5.4.110.0090.04911.98
5.4.100.0110.05011.99
5.4.90.0080.05611.98
5.4.80.0150.05011.98
5.4.70.0060.05711.98
5.4.60.0070.07111.98
5.4.50.0090.07811.98
5.4.40.0110.05411.97
5.4.30.0190.08211.97
5.4.20.0110.05511.96
5.4.10.0080.05511.97
5.4.00.0040.06311.46
5.3.290.0060.04512.80
5.3.280.0080.05112.71
5.3.270.0090.05212.72
5.3.260.0070.06112.72
5.3.250.0060.05312.71
5.3.240.0130.07412.72
5.3.230.0130.07812.71
5.3.220.0090.05612.68
5.3.210.0140.04012.68
5.3.200.0070.03812.68
5.3.190.0050.04212.67
5.3.180.0100.04612.67
5.3.170.0100.03612.67
5.3.160.0090.03712.67
5.3.150.0030.04412.68
5.3.140.0150.09012.66
5.3.130.0100.07212.66
5.3.120.0120.06412.66
5.3.110.0130.06112.66
5.3.100.0050.05312.12
5.3.90.0100.05812.09
5.3.80.0070.05412.07
5.3.70.0120.05112.07
5.3.60.0090.05512.06
5.3.50.0080.06012.00
5.3.40.0110.04912.00
5.3.30.0080.08511.95
5.3.20.0170.05911.75
5.3.10.0200.08711.70
5.3.00.0140.07311.69
5.2.170.0100.0459.19
5.2.160.0120.0629.19
5.2.150.0120.0699.19
5.2.140.0120.0629.18
5.2.130.0140.0579.15
5.2.120.0110.0569.14
5.2.110.0170.0829.15
5.2.100.0070.0429.15
5.2.90.0150.0599.15
5.2.80.0150.0629.14
5.2.70.0070.0699.14
5.2.60.0160.0649.10
5.2.50.0140.0379.07
5.2.40.0060.0589.04
5.2.30.0110.0689.02
5.2.20.0080.0419.01
5.2.10.0060.0348.92
5.2.00.0070.0308.79
5.1.60.0050.0258.07
5.1.50.0080.0238.07
5.1.40.0060.0258.05
5.1.30.0110.0368.40
5.1.20.0060.0298.42
5.1.10.0050.0288.14
5.1.00.0060.0278.14
5.0.50.0050.0246.62
5.0.40.0040.0226.48
5.0.30.0020.0376.30
5.0.20.0040.0226.27
5.0.10.0050.0216.25
5.0.00.0070.0316.23
4.4.90.0040.0204.78
4.4.80.0110.0534.75
4.4.70.0010.0194.75
4.4.60.0030.0174.76
4.4.50.0040.0294.77
4.4.40.0050.0304.71
4.4.30.0110.0334.76
4.4.20.0060.0244.84
4.4.10.0040.0184.85
4.4.00.0020.0294.76
4.3.110.0060.0164.67
4.3.100.0040.0204.67
4.3.90.0040.0174.64
4.3.80.0040.0244.58
4.3.70.0030.0154.63
4.3.60.0050.0144.63
4.3.50.0050.0144.63
4.3.40.0040.0274.54
4.3.30.0050.0333.29
4.3.20.0120.0333.29
4.3.10.0040.0203.23
4.3.00.0130.0176.94

preferences:
74.99 ms | 401 KiB | 5 Q