3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = [1]; $two = [42]; $arr1 = ['k' => &$one]; $arr2 = ['k' => &$two]; var_dump(current($one), current($two)); print_r(array_replace_recursive($arr1, $arr2)); var_dump(current($one), current($two));

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.0110.00416.63
8.3.50.0110.00416.36
8.3.40.0120.00318.69
8.3.30.0070.00718.35
8.3.20.0080.00020.32
8.3.10.0050.00321.76
8.3.00.0000.00823.36
8.2.180.0080.00616.38
8.2.170.0090.00622.96
8.2.160.0100.00320.52
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0080.00020.93
8.2.120.0070.00026.35
8.2.110.0040.00820.99
8.2.100.0040.00717.80
8.2.90.0080.00019.22
8.2.80.0000.00917.97
8.2.70.0030.00617.63
8.2.60.0030.00618.05
8.2.50.0060.00318.09
8.2.40.0040.00422.05
8.2.30.0030.00519.34
8.2.20.0000.00817.65
8.2.10.0040.00418.06
8.2.00.0040.00418.05
8.1.280.0100.01025.92
8.1.270.0040.01122.19
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0080.00022.18
8.1.230.0040.00817.70
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.13
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00418.50
8.1.160.0000.00720.69
8.1.150.0040.00419.00
8.1.140.0050.00319.50
8.1.130.0030.00317.56
8.1.120.0050.00317.43
8.1.110.0000.00717.38
8.1.100.0030.00517.34
8.1.90.0000.00717.33
8.1.80.0000.00717.38
8.1.70.0040.00417.37
8.1.60.0030.00517.41
8.1.50.0000.00917.34
8.1.40.0000.00817.46
8.1.30.0040.00417.63
8.1.20.0020.00517.47
8.1.10.0040.00417.46
8.1.00.0000.00817.48
8.0.300.0000.00918.77
8.0.290.0040.00416.63
8.0.280.0030.00318.38
8.0.270.0030.00317.18
8.0.260.0000.00617.18
8.0.250.0000.00716.78
8.0.240.0080.00016.88
8.0.230.0000.00716.89
8.0.220.0000.00716.71
8.0.210.0050.00316.86
8.0.200.0000.00616.87
8.0.190.0030.00616.78
8.0.180.0070.00016.72
8.0.170.0050.00316.79
8.0.160.0000.00716.83
8.0.150.0080.00016.74
8.0.140.0030.00616.78
8.0.130.0060.00013.20
8.0.120.0040.00416.69
8.0.110.0070.00016.72
8.0.100.0070.00016.66
8.0.90.0000.00816.82
8.0.80.0120.00416.82
8.0.70.0080.00016.79
8.0.60.0070.00016.89
8.0.50.0040.00416.93
8.0.30.0090.00717.03
8.0.20.0090.01117.40
8.0.10.0030.00516.94
8.0.00.0090.00716.63
7.4.330.0050.00016.79
7.4.320.0030.00316.51
7.4.300.0080.00016.37
7.4.290.0070.00016.38
7.4.280.0070.00016.34
7.4.270.0060.00316.54
7.4.260.0040.00416.56
7.4.250.0050.00316.41
7.4.240.0000.00716.51
7.4.230.0000.00716.42
7.4.220.0070.01116.48
7.4.210.0060.00916.59
7.4.200.0070.00016.23
7.4.160.0100.00616.24
7.4.150.0100.00717.40
7.4.140.0070.01217.86
7.4.130.0080.01016.36
7.4.120.0120.00916.47
7.4.110.0030.01316.43
7.4.100.0090.00916.34
7.4.90.0080.00916.45
7.4.80.0060.01419.39
7.4.70.0030.01416.42
7.4.60.0080.00816.55
7.4.50.0000.00916.36
7.4.40.0100.00716.51
7.4.30.0100.01016.40
7.4.00.0100.00314.98
7.3.330.0000.00513.11
7.3.320.0030.00313.09
7.3.310.0030.00316.28
7.3.300.0030.00316.13
7.3.290.0040.01316.22
7.3.280.0040.01416.18
7.3.270.0060.01217.40
7.3.260.0080.01216.20
7.3.250.0040.01216.34
7.3.240.0130.00816.38
7.3.230.0180.00016.39
7.3.210.0100.00716.16
7.3.200.0170.00319.39
7.3.190.0150.00316.38
7.3.180.0100.00716.27
7.3.170.0100.01416.27
7.3.160.0070.01016.23
7.3.120.0080.00814.72
7.3.110.0100.00714.59
7.3.100.0000.01714.94
7.3.90.0040.00714.70
7.3.80.0040.00714.79
7.3.70.0060.00614.93
7.3.60.0040.01114.82
7.3.50.0100.00714.70
7.3.40.0000.01314.70
7.3.30.0030.01414.79
7.3.20.0030.01016.48
7.3.10.0060.00616.59
7.3.00.0060.00316.64
7.2.330.0140.00416.58
7.2.320.0160.01016.21
7.2.310.0070.01116.34
7.2.300.0120.00616.54
7.2.290.0060.00916.35
7.2.240.0070.00314.40
7.2.230.0040.00814.61
7.2.220.0030.01314.99
7.2.210.0060.00914.71
7.2.200.0090.00614.77
7.2.190.0040.01114.45
7.2.180.0070.00714.86
7.2.170.0070.00714.54
7.2.160.0050.00514.74
7.2.150.0030.01416.87
7.2.140.0000.01516.65
7.2.130.0110.00716.80
7.2.120.0040.00716.80
7.2.110.0070.00716.79
7.2.100.0060.00916.53
7.2.90.0060.00616.66
7.2.80.0090.00616.73
7.2.70.0060.00916.67
7.2.60.0050.00916.80
7.2.50.0090.00616.84
7.2.40.0130.00317.02
7.2.30.0100.00316.64
7.2.20.0070.00716.67
7.2.10.0070.01016.64
7.2.00.0040.00917.79
7.1.330.0040.01115.89
7.1.320.0060.01215.46
7.1.310.0030.00715.66
7.1.300.0060.00915.73
7.1.290.0060.00915.79
7.1.280.0110.00415.98
7.1.270.0030.00615.76
7.1.260.0000.01415.74
7.1.250.0120.00315.56
7.1.200.0120.00015.76
7.1.100.0080.00318.07
7.1.70.0030.00617.13
7.1.60.0100.01419.40
7.1.50.0100.01417.02
7.1.00.0030.07722.57
7.0.200.1440.00714.56
7.0.60.0070.06321.82
7.0.50.0000.09017.93
7.0.40.0100.08720.21
7.0.30.0200.06320.23
7.0.20.0230.08020.07
7.0.10.0100.06720.25
7.0.00.0070.04320.20
5.6.280.0000.05321.11
5.6.210.0030.08320.60
5.6.200.0100.07718.16
5.6.190.0130.05020.61
5.6.180.0230.05020.61
5.6.170.0330.05720.44
5.6.160.0030.05320.43
5.6.150.0100.04018.19
5.6.140.0130.03018.18
5.6.130.0100.07718.15
5.6.120.0030.07021.02
5.6.110.0100.03320.95
5.6.100.0100.06320.88
5.6.90.0100.03721.01
5.6.80.0100.06020.47
5.5.350.0000.08020.35
5.5.340.0000.04017.97
5.5.330.0100.03720.27
5.5.320.0630.04720.29
5.5.310.0270.08320.26
5.5.300.0030.04017.93
5.5.290.0070.04718.00
5.5.280.0030.09020.86
5.5.270.0030.08020.76
5.5.260.0070.03720.88
5.5.250.0030.05320.69
5.5.240.0200.08020.14

preferences:
61.69 ms | 400 KiB | 5 Q