3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ 0 => 'Data 1 Table 1', 1 => null, 2 => 'Data 2 Table 1', 3 => null, 4 => null, 5 => 'Data 3 Table 1', ]; $arr2 = [ 0 => 'Data 1 Table 2', 1 => 'Data 2 Table 2', 2 => 'Data 3 Table 2', ]; $result = array_replace($arr1,array_combine(array_keys(array_intersect($arr1, [null])), $arr2)); var_dump($result);

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.4.120.0090.01122.59
8.4.110.0110.00818.82
8.4.100.0110.00917.59
8.4.90.0140.00722.46
8.4.80.0140.00617.66
8.4.70.0040.00417.49
8.4.60.0120.00820.73
8.4.50.0100.01022.44
8.4.40.0090.00919.24
8.4.30.0170.00318.50
8.4.20.0160.00320.52
8.4.10.0040.01219.32
8.3.250.0080.00919.02
8.3.240.0080.01116.53
8.3.230.0080.01116.32
8.3.220.0040.00417.15
8.3.210.0100.00818.29
8.3.200.0050.00516.68
8.3.190.0120.00816.99
8.3.180.0110.00418.26
8.3.170.0060.01216.99
8.3.160.0120.00619.82
8.3.150.0040.00418.38
8.3.140.0070.01116.48
8.3.130.0040.00418.14
8.3.120.0090.00018.46
8.3.110.0080.00018.24
8.3.100.0080.00018.18
8.3.90.0080.00018.18
8.3.80.0090.00317.97
8.3.70.0110.00416.38
8.3.60.0090.01318.09
8.3.50.0080.00816.41
8.3.40.0030.01318.89
8.3.30.0090.00618.40
8.3.20.0040.00421.77
8.3.10.0050.00320.19
8.3.00.0070.00021.94
8.2.290.0120.00720.14
8.2.280.0080.01018.27
8.2.270.0180.00017.21
8.2.260.0070.01116.09
8.2.250.0000.00816.48
8.2.240.0090.00618.89
8.2.230.0040.00420.94
8.2.220.0070.01124.06
8.2.210.0100.01026.77
8.2.200.0060.00316.63
8.2.190.0110.00716.58
8.2.180.0090.00618.42
8.2.170.0070.01022.96
8.2.160.0120.00320.46
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0100.00720.56
8.2.110.0060.00319.05
8.2.100.0070.00417.72
8.2.90.0000.00817.85
8.2.80.0000.00817.97
8.2.70.0080.00017.93
8.2.60.0000.00717.97
8.2.50.0000.00918.10
8.2.40.0000.00819.26
8.2.30.0050.00220.30
8.2.20.0040.00417.98
8.2.10.0070.00019.17
8.2.00.0040.00418.11
8.1.330.0100.00922.06
8.1.320.0120.00815.91
8.1.310.0120.00418.42
8.1.300.0000.00918.45
8.1.290.0060.00618.88
8.1.280.0110.00425.92
8.1.270.0040.00420.23
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.18
8.1.230.0040.00720.96
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00417.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0060.00318.46
8.1.160.0050.00218.88
8.1.150.0040.00418.88
8.1.140.0000.00718.80
8.1.130.0000.00719.08
8.1.120.0050.00217.45
8.1.110.0040.00417.27
8.1.100.0000.00717.37
8.1.90.0070.00017.28
8.1.80.0080.00017.29
8.1.70.0040.00417.38
8.1.60.0040.00417.40
8.1.50.0080.00017.42
8.1.40.0030.00617.41
8.1.30.0040.00417.56
8.1.20.0040.00417.61
8.1.10.0000.00817.38
8.1.00.0000.00817.39
8.0.300.0070.00020.02
8.0.290.0030.00616.63
8.0.280.0040.00318.38
8.0.270.0100.00016.86
8.0.260.0060.00016.67
8.0.250.0050.00516.92
8.0.240.0070.00416.89
8.0.230.0030.00316.86
8.0.220.0000.00716.80
8.0.210.0040.00416.73
8.0.200.0040.00416.95
8.0.190.0000.00916.88
8.0.180.0040.00416.87
8.0.170.0000.00816.84
8.0.160.0000.00816.86
8.0.150.0080.00416.69
8.0.140.0050.00316.81
8.0.130.0000.00513.20
8.0.120.0070.00016.69
8.0.110.0000.00816.65
8.0.100.0000.00816.61
8.0.90.0040.00416.73
8.0.80.0000.01416.81
8.0.70.0040.00416.64
8.0.60.0040.00416.75
8.0.50.0000.00816.81
8.0.30.0100.00916.94
8.0.20.0120.01216.92
8.0.10.0000.00716.86
8.0.00.0130.00716.67
7.4.330.0040.00015.55
7.4.320.0000.00616.52
7.4.300.0000.00616.45
7.4.290.0060.00316.41
7.4.280.0000.00816.50
7.4.270.0030.00316.58
7.4.260.0040.00416.41
7.4.250.0030.00316.30
7.4.240.0040.00416.44
7.4.230.0060.00016.51
7.4.220.0090.00016.62
7.4.210.0110.00616.44
7.4.200.0000.00716.50
7.4.160.0090.00816.37
7.4.130.0140.01016.30
7.4.120.0110.01216.36
7.4.110.0070.01016.40
7.4.100.0170.00016.36
7.4.90.0090.00916.34
7.4.80.0170.00319.39
7.4.70.0080.01516.47
7.4.60.0110.01116.51
7.4.50.0100.00616.54
7.4.40.0070.01416.16
7.4.00.0050.01314.67
7.3.330.0000.00612.97
7.3.320.0000.00512.88
7.3.310.0030.00316.20
7.3.300.0000.00716.17
7.3.290.0050.00316.07
7.3.280.0030.01316.13
7.3.260.0080.00816.34
7.3.230.0120.00416.08
7.3.210.0110.00616.28
7.3.200.0060.01216.16
7.3.190.0060.00916.16
7.3.180.0080.00816.35
7.3.170.0030.01316.19
7.3.160.0080.00816.25
7.3.120.0190.00014.80
7.3.110.0060.00914.65
7.3.100.0070.01314.52
7.3.90.0100.00314.66
7.3.80.0070.00714.78
7.3.70.0030.01214.55
7.3.60.0120.00314.57
7.3.50.0050.00714.60
7.3.40.0050.00614.54
7.3.30.0080.00614.56
7.3.20.0050.00916.35
7.3.10.0050.00916.45
7.3.00.0040.00616.44
7.2.330.0070.01016.50
7.2.320.0030.01616.21
7.2.310.0080.01416.25
7.2.300.0060.01116.56
7.2.290.0140.00316.64
7.2.250.0040.01514.84
7.2.240.0070.01115.01
7.2.230.0090.00614.77
7.2.220.0110.00414.75
7.2.210.0060.01214.56
7.2.200.0080.00814.91
7.2.190.0130.00315.05
7.2.180.0060.00614.75
7.2.170.0050.01115.01
7.2.160.0090.00814.82
7.2.150.0060.01016.73
7.2.140.0070.00716.77
7.2.130.0070.00716.73
7.2.120.0090.00416.64
7.2.110.0080.00716.76
7.2.100.0070.01016.57
7.2.90.0030.01016.78
7.2.80.0070.00716.73
7.2.70.0080.00616.98
7.2.60.0030.00916.71
7.2.50.0040.01016.68
7.2.40.0080.00616.82
7.2.30.0060.00916.90
7.2.20.0070.00916.83
7.2.10.0050.00816.75
7.2.00.0080.00716.79
7.1.330.0040.01515.84
7.1.320.0080.01115.82
7.1.310.0030.01615.87
7.1.300.0060.00615.73
7.1.290.0060.00315.80
7.1.280.0050.00815.64
7.1.270.0070.01215.65
7.1.260.0080.00715.85
7.1.250.0030.01015.62
7.1.240.0080.00615.88
7.1.230.0080.00315.80
7.1.220.0040.01215.41
7.1.210.0030.01015.67
7.1.200.0040.00715.69
7.1.190.0000.01415.65
7.1.180.0060.01215.72
7.1.170.0070.00715.88
7.1.160.0000.01315.44
7.1.150.0090.00615.73
7.1.140.0040.00815.51
7.1.130.0030.01015.75
7.1.120.0030.01315.82
7.1.110.0080.00315.62
7.1.100.0040.00915.89
7.1.90.0080.00515.79
7.1.80.0090.00615.69
7.1.70.0070.00715.58
7.1.60.0070.00315.68
7.1.50.0030.00915.76
7.1.40.0040.00715.50
7.1.30.0030.01015.78
7.1.20.0090.00615.65
7.1.10.0120.00315.83
7.1.00.0120.00315.84

preferences:
26.97 ms | 403 KiB | 5 Q