3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("a" => "apple", "b" => "banana"); $b = array("a" => "pear", "b" => "strawberry", "c" => "cherry"); print_r(array_replace($b, $a));

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.0120.00918.30
8.3.50.0090.01021.91
8.3.40.0070.01418.59
8.3.30.0040.01118.42
8.3.20.0000.00818.40
8.3.10.0060.01221.15
8.3.00.0050.00321.87
8.2.180.0110.00716.38
8.2.170.0110.00422.96
8.2.160.0070.00720.57
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.89
8.2.110.0030.00720.35
8.2.100.0120.00017.66
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0040.00418.03
8.2.30.0040.00421.21
8.2.20.0050.00317.47
8.2.10.0000.00717.59
8.2.00.0060.00317.55
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0070.00322.42
8.1.230.0070.00420.89
8.1.220.0040.00418.77
8.1.210.0080.00018.85
8.1.200.0060.00316.88
8.1.190.0040.00417.50
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0040.00418.75
8.1.150.0040.00418.52
8.1.140.0000.00717.40
8.1.130.0030.00317.80
8.1.120.0090.00017.30
8.1.110.0000.00817.37
8.1.100.0000.00717.39
8.1.90.0000.00817.43
8.1.80.0040.00417.37
8.1.70.0030.00317.29
8.1.60.0000.00917.53
8.1.50.0040.00417.43
8.1.40.0040.00417.34
8.1.30.0070.00017.48
8.1.20.0040.00417.57
8.1.10.0000.00717.42
8.1.00.0000.00917.38
8.0.300.0030.00319.88
8.0.290.0000.00717.05
8.0.280.0000.00718.37
8.0.270.0050.00317.23
8.0.260.0000.00716.66
8.0.250.0040.00416.91
8.0.240.0000.01016.79
8.0.230.0040.00316.88
8.0.220.0000.00716.84
8.0.210.0070.00016.74
8.0.200.0050.00216.77
8.0.190.0040.00416.74
8.0.180.0050.00216.82
8.0.170.0000.00916.86
8.0.160.0070.00016.88
8.0.150.0000.00716.69
8.0.140.0000.00716.71
8.0.130.0040.00413.23
8.0.120.0040.00416.71
8.0.110.0000.00716.87
8.0.100.0000.00716.71
8.0.90.0040.00416.82
8.0.80.0060.01016.72
8.0.70.0000.00716.81
8.0.60.0030.00616.72
8.0.50.0070.00016.76
8.0.30.0140.01217.02
8.0.20.0030.01917.40
8.0.10.0000.00716.89
8.0.00.0110.01116.68
7.4.330.0000.00514.86
7.4.320.0000.00716.43
7.4.300.0000.00616.32
7.4.290.0040.00416.44
7.4.280.0030.00316.52
7.4.270.0070.00016.42
7.4.260.0000.00613.18
7.4.250.0030.00616.46
7.4.240.0040.00416.34
7.4.230.0000.00716.41
7.4.220.0100.00616.46
7.4.210.0070.00916.44
7.4.200.0000.00716.27
7.4.190.0050.00316.61
7.4.160.0040.01216.57
7.4.150.0100.00917.40
7.4.140.0100.01317.86
7.4.130.0050.01516.44
7.4.120.0090.00816.46
7.4.110.0170.00716.32
7.4.100.0030.01816.51
7.4.90.0060.01716.42
7.4.80.0140.00319.39
7.4.70.0140.00316.32
7.4.60.0160.00416.27
7.4.50.0050.00316.28
7.4.40.0080.00522.52
7.4.30.0100.01216.35
7.4.00.0030.01314.81
7.3.330.0000.00513.08
7.3.320.0030.00312.81
7.3.310.0070.00016.00
7.3.300.0000.00716.20
7.3.290.0090.00616.09
7.3.280.0070.00816.11
7.3.270.0100.00717.40
7.3.260.0110.00718.24
7.3.250.0090.00916.29
7.3.240.0060.00916.43
7.3.230.0110.00616.39
7.3.210.0030.01516.29
7.3.200.0140.01119.39
7.3.190.0140.00316.15
7.3.180.0050.01016.21
7.3.170.0060.00916.52
7.3.160.0090.00616.51
7.3.120.0050.01314.63
7.3.110.0070.01114.92
7.3.100.0040.01014.39
7.3.90.0070.00714.74
7.3.80.0030.01314.44
7.3.70.0000.00914.41
7.3.60.0030.01014.65
7.3.50.0070.01014.60
7.3.40.0080.00414.61
7.3.30.0040.01114.55
7.3.20.0100.00316.42
7.3.10.0030.00716.55
7.3.00.0000.01016.72
7.2.330.0080.01216.54
7.2.320.0080.01516.41
7.2.310.0100.00716.48
7.2.300.0080.00816.51
7.2.290.0060.01016.52
7.2.250.0110.00815.11
7.2.240.0060.01314.65
7.2.230.0070.00614.79
7.2.220.0110.00415.07
7.2.210.0090.00614.70
7.2.200.0060.00614.66
7.2.190.0130.00314.96
7.2.180.0080.00014.61
7.2.170.0030.01214.93
7.1.330.0100.00315.70
7.1.320.0050.00315.67
7.1.310.0030.01315.59
7.1.300.0000.01215.79
7.1.290.0030.00615.64
7.1.280.0040.00415.54
7.1.270.0070.00715.75
7.1.260.0030.01015.80
7.1.100.0030.00817.91
7.1.70.0030.00517.16
7.1.60.0110.01419.40
7.1.50.0000.02116.93
7.1.00.0000.03722.42
7.0.200.0000.01616.40
7.0.140.0000.07722.05
7.0.110.0070.08021.76
7.0.100.0030.07021.86
7.0.90.0100.07321.70
7.0.80.0030.07721.73
7.0.70.0100.08021.71
7.0.60.0000.08321.67
7.0.50.0000.08321.66
7.0.40.0030.05019.79
7.0.30.0070.05719.84
7.0.20.0030.08019.74
7.0.10.0000.08319.70
7.0.00.0100.08019.78
5.6.280.0030.07321.07
5.6.260.0030.08720.62
5.6.250.0070.07720.68
5.6.240.0070.08020.57
5.6.230.0130.07320.66
5.6.220.0070.08020.68
5.6.210.0100.07020.80
5.6.200.0030.07320.69
5.6.190.0070.08320.69
5.6.180.0070.07320.64
5.6.170.0070.08020.69
5.6.160.0100.07320.62
5.6.150.0070.08020.60
5.6.140.0000.08020.84
5.6.130.0070.08020.55
5.6.120.0030.08020.55
5.6.110.0070.03720.59
5.6.100.0100.07320.54
5.6.90.0070.08020.63
5.6.80.0070.06720.02
5.6.70.0030.08020.02
5.6.60.0070.04319.93
5.6.50.0030.07720.03
5.6.40.0070.07019.91
5.6.30.0070.06020.01
5.6.20.0070.04719.96
5.6.10.0070.07320.05
5.6.00.0070.05019.89
5.5.380.0070.04020.57
5.5.370.0030.04020.46
5.5.360.0030.07720.54
5.5.350.0030.08020.15
5.5.340.0100.08320.75
5.5.330.0030.08020.70
5.5.320.0100.04320.73
5.5.310.0030.08320.93
5.5.300.0030.07020.86
5.5.290.0030.08020.97
5.5.280.0030.08320.77
5.5.270.0030.04320.91
5.5.260.0070.07320.88
5.5.250.0070.08320.75
5.5.240.0070.08020.27
5.5.230.0000.08320.18
5.5.220.0170.07320.18
5.5.210.0130.06720.32
5.5.200.0100.07320.35
5.5.190.0070.07020.29
5.5.180.0070.08020.29
5.5.160.0000.08320.29
5.5.150.0130.03020.36
5.5.140.0000.08020.32
5.5.130.0030.07720.32
5.5.120.0070.07320.11
5.5.110.0030.08020.29
5.5.100.0070.06020.16
5.5.90.0070.07320.24
5.5.80.0070.07320.27
5.5.70.0000.07020.03
5.5.60.0030.08020.06
5.5.50.0070.07719.95
5.5.40.0070.04720.25
5.5.30.0000.08320.16
5.5.20.0100.06019.96
5.5.10.0100.07720.11
5.5.00.0070.04320.21
5.4.450.0000.08719.31
5.4.440.0000.05319.28
5.4.430.0030.07319.30
5.4.420.0000.08319.34
5.4.410.0000.08019.16
5.4.400.0070.06019.10
5.4.390.0000.08019.18
5.4.380.0070.07319.12
5.4.370.0070.06719.27
5.4.360.0100.07019.15
5.4.350.0000.08018.95
5.4.340.0000.08319.18
5.4.320.0000.06019.16
5.4.310.0030.05318.93
5.4.300.0070.07719.30
5.4.290.0030.07718.95
5.4.280.0000.08019.10
5.4.270.0030.07718.92
5.4.260.0030.05718.95
5.4.250.0030.05019.00
5.4.240.0030.06319.24
5.4.230.0100.07019.09
5.4.220.0030.08019.25
5.4.210.0070.03719.16
5.4.200.0070.07019.11
5.4.190.0000.06719.24
5.4.180.0070.06019.20
5.4.170.0030.06319.00
5.4.160.0100.06019.14
5.4.150.0000.04719.09
5.4.140.0000.07716.40
5.4.130.0000.07316.17
5.4.120.0000.04316.17
5.4.110.0030.07716.19
5.4.100.0030.06716.49
5.4.90.0030.03716.52
5.4.80.0030.07716.40
5.4.70.0130.04716.36
5.4.60.0000.04716.38
5.4.50.0000.07316.35
5.4.40.0030.06716.53
5.4.30.0000.07716.22
5.4.20.0030.04016.25
5.4.10.0100.06716.33
5.4.00.0030.07015.84
5.3.290.0000.08314.66
5.3.280.0070.04014.52
5.3.270.0030.07714.54
5.3.260.0030.07314.62
5.3.250.0030.07714.48
5.3.240.0030.08014.57
5.3.230.0000.07314.61
5.3.220.0030.06714.55
5.3.210.0000.08314.59
5.3.200.0000.06314.58
5.3.190.0070.06714.43
5.3.180.0070.07314.66
5.3.170.0030.06314.49
5.3.160.0030.03314.49
5.3.150.0070.07014.57
5.3.140.0000.07714.49
5.3.130.0070.07714.64
5.3.120.0000.07714.44
5.3.110.0030.08014.55
5.3.100.0100.06714.29
5.3.90.0000.07714.29
5.3.80.0030.07014.29
5.3.70.0000.07014.29
5.3.60.0070.04014.29
5.3.50.0000.07714.29
5.3.40.0100.07014.29
5.3.30.0100.07014.29
5.3.20.0030.07014.29
5.3.10.0070.05014.29
5.3.00.0000.03714.29
5.2.170.0000.06314.29
5.2.160.0030.06014.29
5.2.150.0070.03014.29
5.2.140.0030.06014.29
5.2.130.0030.06014.29
5.2.120.0030.03314.29
5.2.110.0000.03714.29
5.2.100.0000.03014.29
5.2.90.0030.02714.29
5.2.80.0000.04014.29
5.2.70.0070.02314.29
5.2.60.0000.03014.29
5.2.50.0000.04714.29
5.2.40.0030.02714.29
5.2.30.0030.02714.29
5.2.20.0030.02714.29
5.2.10.0000.02714.29
5.2.00.0000.03014.29
5.1.60.0000.02314.29
5.1.50.0000.02314.29
5.1.40.0000.02314.29
5.1.30.0030.02314.29
5.1.20.0030.02314.29
5.1.10.0000.02714.29
5.1.00.0000.03314.29
5.0.50.0030.02714.29
5.0.40.0070.01314.29
5.0.30.0000.05714.29
5.0.20.0030.04014.29
5.0.10.0070.03714.29
5.0.00.0000.06714.29
4.4.90.0000.01714.29
4.4.80.0000.01314.29
4.4.70.0000.01714.29
4.4.60.0030.01314.29
4.4.50.0000.01314.29
4.4.40.0000.02314.29
4.4.30.0000.01314.29
4.4.20.0030.01314.29
4.4.10.0000.01314.29
4.4.00.0000.03714.29
4.3.110.0000.01314.29
4.3.100.0000.03314.29
4.3.90.0030.03014.29
4.3.80.0000.05314.29
4.3.70.0000.02714.29
4.3.60.0000.03714.29
4.3.50.0000.03014.29
4.3.40.0000.05014.29
4.3.30.0030.03314.29
4.3.20.0030.03314.29
4.3.10.0030.01014.29
4.3.00.0030.02314.29

preferences:
43.09 ms | 401 KiB | 5 Q