3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_1 = array(1,2,3,4,5); $array_2 = array('a','b','c'); $positions = array(1,3,4); $positionArray = array_combine($positions, $array_2); foreach($positionArray as $key => $value){ array_splice($array_1, $key, 0, $value); } print_r($array_1);

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.70.0000.01416.75
8.3.60.0040.01118.30
8.3.50.0170.00016.26
8.3.40.0150.00018.59
8.3.30.0060.01218.63
8.3.20.0040.00423.50
8.3.10.0030.00522.04
8.3.00.0040.00421.69
8.2.190.0180.00016.58
8.2.180.0140.00325.92
8.2.170.0090.00622.96
8.2.160.0140.00020.51
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0000.00726.16
8.2.120.0110.00419.36
8.2.110.0030.00721.11
8.2.100.0060.00617.78
8.2.90.0080.00017.78
8.2.80.0050.00318.05
8.2.70.0000.00817.93
8.2.60.0080.00018.16
8.2.50.0040.00418.10
8.2.40.0100.00019.34
8.2.30.0070.00019.27
8.2.20.0040.00417.96
8.2.10.0050.00219.28
8.2.00.0000.00819.28
8.1.280.0070.01425.92
8.1.270.0050.00322.19
8.1.260.0090.00926.35
8.1.250.0070.00728.09
8.1.240.0060.00620.44
8.1.230.0050.00522.66
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0080.00017.36
8.1.190.0000.00817.13
8.1.180.0060.00319.03
8.1.170.0000.00818.41
8.1.160.0070.00319.05
8.1.150.0030.00518.93
8.1.140.0000.00720.64
8.1.130.0080.00020.31
8.1.120.0000.00717.46
8.1.110.0050.00317.46
8.1.100.0000.00717.47
8.1.90.0070.00017.43
8.1.80.0030.00617.42
8.1.70.0030.00317.33
8.1.60.0030.00617.57
8.1.50.0030.00517.54
8.1.40.0000.00817.48
8.1.30.0080.00017.61
8.1.20.0040.00417.66
8.1.10.0040.00417.52
8.1.00.0000.00717.38
8.0.300.0040.00421.65
8.0.290.0000.00716.75
8.0.280.0040.00418.49
8.0.270.0070.00016.81
8.0.260.0060.00320.06
8.0.250.0000.00616.85
8.0.240.0000.00816.83
8.0.230.0100.00016.94
8.0.220.0030.00316.77
8.0.210.0040.00416.91
8.0.200.0060.00016.93
8.0.190.0030.00316.95
8.0.180.0070.00016.98
8.0.170.0030.00716.80
8.0.160.0000.00716.93
8.0.150.0000.00716.83
8.0.140.0040.00416.74
8.0.130.0000.00613.36
8.0.120.0030.00616.74
8.0.110.0040.00416.73
8.0.100.0040.00416.90
8.0.90.0080.00016.86
8.0.80.0090.00616.93
8.0.70.0000.00716.71
8.0.60.0000.00816.82
8.0.50.0050.00316.88
8.0.30.0130.00416.95
8.0.20.0130.00617.00
8.0.10.0000.00717.05
8.0.00.0110.01016.93
7.4.330.0060.00016.71
7.4.320.0000.00616.54
7.4.300.0030.00316.43
7.4.290.0070.00016.54
7.4.280.0040.00416.48
7.4.270.0050.00316.51
7.4.260.0030.00313.24
7.4.250.0000.00816.45
7.4.240.0040.00416.54
7.4.230.0000.00816.48
7.4.220.0040.00416.44
7.4.210.0090.00916.59
7.4.200.0000.00716.38
7.4.130.0180.00016.54
7.4.120.0220.00316.50
7.4.110.0100.00716.55
7.4.100.0060.01116.39
7.4.90.0000.01816.45
7.4.80.0130.01019.39
7.4.70.0130.00316.51
7.4.60.0000.01616.30
7.4.50.0070.00316.54
7.4.40.0090.00616.63
7.4.20.0090.01216.41
7.4.10.0080.01116.43
7.4.00.0060.01216.32
7.3.330.0000.00716.21
7.3.320.0050.00013.01
7.3.310.0040.00416.31
7.3.300.0030.00316.29
7.3.290.0040.01016.24
7.3.260.0100.01016.23
7.3.240.0070.00916.36
7.3.230.0090.00916.29
7.3.210.0060.01016.34
7.3.200.0150.00716.53
7.3.190.0030.01416.45
7.3.180.0060.00916.37
7.3.170.0100.01016.57
7.3.160.0160.00216.23
7.3.130.0030.01416.48
7.3.120.0050.01016.20
7.3.110.0110.00716.18
7.3.100.0090.01216.11
7.3.90.0150.00316.34
7.3.80.0130.00616.57
7.3.70.0150.00916.32
7.3.60.0150.00716.22
7.3.50.0210.02016.17
7.3.40.0100.01016.20
7.3.30.0070.01016.29
7.3.20.0040.01816.21
7.3.10.0120.00916.39
7.3.00.0160.00016.23
7.2.330.0030.01416.79
7.2.320.0060.01216.68
7.2.310.0090.01416.81
7.2.300.0070.01516.74
7.2.290.0140.00916.73
7.2.260.0120.00616.69
7.2.250.0100.01016.54
7.2.240.0120.01216.63
7.2.230.0090.01216.59
7.2.220.0070.01016.39
7.2.210.0060.01616.57
7.2.200.0130.01016.46
7.2.190.0160.00616.46
7.2.180.0160.01016.42
7.2.170.0130.00616.50
7.2.160.0090.01216.49
7.2.150.0180.00916.82
7.2.140.0170.00816.61
7.2.130.0160.00916.57
7.2.120.0080.01716.58
7.2.110.0060.01316.34
7.2.100.0030.01716.54
7.2.90.0060.01316.63
7.2.80.0070.01016.42
7.2.70.0110.00716.44
7.2.60.0340.00916.60
7.2.50.0090.00916.66
7.2.40.0060.01316.68
7.2.30.0130.00916.68
7.2.20.0160.00616.57
7.2.10.0150.00916.55
7.2.00.0090.00916.65

preferences:
53.12 ms | 401 KiB | 5 Q