3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prvi = [ 'jabolka' => 'Jabolka', 'hruske' => 'Hruške' ]; $drugi = [ 'borovnice' => 'Borovnice', 'pomarance' => 'Pomaranče' ]; array_splice_preserve_keys( $prvi, 1, null, $drugi ); echo '<pre>'.print_r($prvi, true).'</pre>'; function array_splice_preserve_keys(&$input, $offset, $length=null, $replacement=array()) { if (empty($replacement)) { return array_splice($input, $offset, $length); } $part_before = array_slice($input, 0, $offset, $preserve_keys=true); $part_removed = array_slice($input, $offset, $length, $preserve_keys=true); $part_after = array_slice($input, $offset+$length, null, $preserve_keys=true); $input = $part_before + $replacement + $part_after; return $part_removed; }

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.0080.00818.31
8.3.50.0070.01118.28
8.3.40.0110.00718.78
8.3.30.0090.00618.57
8.3.20.0000.00820.14
8.3.10.0040.00423.66
8.3.00.0040.00419.68
8.2.180.0100.01018.32
8.2.170.0140.00322.96
8.2.160.0140.00020.47
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.01426.16
8.2.120.0000.00819.79
8.2.110.0090.00020.48
8.2.100.0120.00017.91
8.2.90.0030.00517.84
8.2.80.0050.00317.97
8.2.70.0040.00417.80
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0030.00620.59
8.2.30.0000.00919.16
8.2.20.0070.00017.95
8.2.10.0040.00418.02
8.2.00.0050.00218.32
8.1.280.0070.01425.92
8.1.270.0080.00021.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.50
8.1.230.0070.00422.62
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.53
8.1.180.0030.00618.10
8.1.170.0060.00318.50
8.1.160.0020.00518.91
8.1.150.0000.00720.25
8.1.140.0050.00317.66
8.1.130.0030.00318.96
8.1.120.0040.00517.52
8.1.110.0030.00517.49
8.1.100.0090.00017.36
8.1.90.0050.00317.47
8.1.80.0000.00817.37
8.1.70.0040.00417.51
8.1.60.0040.00417.66
8.1.50.0040.00417.52
8.1.40.0000.00817.36
8.1.30.0030.00517.61
8.1.20.0080.00317.63
8.1.10.0040.00417.40
8.1.00.0000.00817.38
8.0.300.0040.00420.09
8.0.290.0000.00916.88
8.0.280.0070.00018.51
8.0.270.0030.00317.29
8.0.260.0040.00416.74
8.0.250.0070.00017.06
8.0.240.0040.00416.93
8.0.230.0070.00316.96
8.0.220.0040.00416.87
8.0.210.0040.00416.84
8.0.200.0040.00417.07
8.0.190.0040.00417.03
8.0.180.0060.00317.02
8.0.170.0060.00316.82
8.0.160.0000.00817.01
8.0.150.0000.00816.93
8.0.140.0000.00916.81
8.0.130.0030.00313.39
8.0.120.0040.00416.79
8.0.110.0000.00816.86
8.0.100.0000.00817.01
8.0.90.0000.00716.77
8.0.80.0130.00316.86
8.0.70.0000.00817.01
8.0.60.0040.00416.91
8.0.50.0080.00016.85
8.0.30.0130.00717.13
8.0.20.0140.00717.40
8.0.10.0040.00416.84
8.0.00.0100.00716.80
7.4.330.0020.00215.55
7.4.320.0060.00016.49
7.4.300.0000.00616.54
7.4.290.0000.00816.51
7.4.280.0000.00716.56
7.4.270.0000.00716.58
7.4.260.0030.00316.57
7.4.250.0030.00516.41
7.4.240.0040.00416.55
7.4.230.0040.00416.57
7.4.220.0070.00016.62
7.4.210.0070.01016.70
7.4.200.0020.00516.34
7.4.160.0120.00616.53
7.4.150.0070.01317.40
7.4.140.0110.00817.86
7.4.130.0070.01416.54
7.4.120.0120.00716.54
7.4.110.0090.01616.64
7.4.100.0030.01316.37
7.4.90.0090.00816.47
7.4.80.0080.00919.39
7.4.70.0100.01316.52
7.4.60.0040.01616.55
7.4.50.0030.01416.41
7.4.40.0070.01716.55
7.4.00.0060.01014.91
7.3.330.0050.00013.14
7.3.320.0000.00613.32
7.3.310.0070.00016.38
7.3.300.0030.00316.32
7.3.290.0100.00616.31
7.3.280.0000.01416.34
7.3.270.0130.00317.40
7.3.260.0100.01016.56
7.3.250.0100.00916.52
7.3.240.0050.01116.40
7.3.230.0090.00616.57
7.3.210.0130.00316.44
7.3.200.0090.00916.66
7.3.190.0100.00716.34
7.3.180.0110.00616.48
7.3.170.0130.00416.57
7.3.160.0070.01016.32
7.3.120.0040.01414.73
7.3.110.0040.01414.49
7.3.100.0030.00714.44
7.3.90.0090.00614.95
7.3.80.0000.01614.83
7.3.70.0090.00614.84
7.3.60.0000.01314.75
7.3.50.0140.00014.71
7.3.40.0070.00714.82
7.3.30.0040.00714.85
7.3.20.0060.00916.83
7.3.10.0020.00916.75
7.3.00.0070.00616.72
7.2.330.0100.01316.57
7.2.320.0120.00616.78
7.2.310.0040.01316.62
7.2.300.0140.01016.41
7.2.290.0060.01216.75
7.2.250.0000.01715.23
7.2.240.0080.01215.17
7.2.230.0100.00315.29
7.2.220.0100.00014.90
7.2.210.0070.01015.17
7.2.200.0120.00615.17
7.2.190.0060.01014.93
7.2.180.0050.00515.09
7.2.170.0040.01115.09
7.2.130.0030.01016.89
7.2.120.0060.00617.05
7.2.110.0070.01017.07
7.2.100.0110.00016.73
7.2.90.0070.00716.77
7.2.80.0000.01616.70
7.2.70.0080.00416.98
7.2.60.0080.00517.05
7.2.50.0040.01116.73
7.2.40.0090.00916.79
7.2.30.0000.01116.86
7.2.20.0160.00617.51
7.2.10.0170.00417.38
7.2.00.0120.01017.27
7.1.330.0120.00315.54
7.1.320.0090.00315.68
7.1.310.0030.01015.84
7.1.300.0140.00015.79
7.1.290.0000.01415.76
7.1.280.0000.00915.77
7.1.270.0090.00615.97
7.1.260.0060.00315.47
7.1.250.0000.01015.54
7.1.200.0030.00615.55
7.1.140.0240.00616.97
7.1.130.0200.00717.04
7.1.120.0210.00917.03
7.1.110.0180.01416.27
7.1.100.0270.00316.18
7.1.90.0230.00816.32
7.1.80.1000.00716.34
7.1.70.0180.00615.47
7.1.60.0340.01533.37
7.1.50.0310.00732.78
7.1.40.0280.00632.43
7.1.30.0230.01332.52
7.1.20.0240.01332.69
7.1.10.0150.00614.65
7.1.00.0130.00914.74

preferences:
67.32 ms | 400 KiB | 5 Q