3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = array(2,3,1); $data = array(11,22,33,44,55,66); $startingIndex = 0; for ($i=0; $i < count($nums); $i++) { $a[] = array_slice($data,$startingIndex,$nums[$i]); $startingIndex+=$nums[$i]; } var_dump($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.00318.31
8.3.50.0030.01416.30
8.3.40.0070.01018.74
8.3.30.0090.00618.79
8.3.20.0000.00721.91
8.3.10.0030.00523.67
8.3.00.0030.00521.39
8.2.180.0060.00816.75
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00425.66
8.2.140.0000.01024.66
8.2.130.0000.00820.55
8.2.120.0040.00426.35
8.2.110.0060.00320.95
8.2.100.0060.00617.72
8.2.90.0040.00418.16
8.2.80.0040.00418.19
8.2.70.0000.00818.04
8.2.60.0030.00517.63
8.2.50.0000.00718.10
8.2.40.0000.00922.18
8.2.30.0070.00019.43
8.2.20.0080.00318.16
8.2.10.0080.00017.68
8.2.00.0000.00718.10
8.1.280.0040.01125.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.42
8.1.230.0040.00820.92
8.1.220.0040.00417.74
8.1.210.0000.00818.86
8.1.200.0040.00417.35
8.1.190.0040.00717.25
8.1.180.0040.00418.10
8.1.170.0000.00818.59
8.1.160.0000.00718.88
8.1.150.0030.00320.26
8.1.140.0030.00617.75
8.1.130.0040.00419.01
8.1.120.0040.00417.51
8.1.110.0040.00417.44
8.1.100.0000.00717.44
8.1.90.0060.00617.41
8.1.80.0000.00717.34
8.1.70.0070.00417.36
8.1.60.0040.00417.65
8.1.50.0030.00717.52
8.1.40.0000.00817.55
8.1.30.0040.00417.67
8.1.20.0030.00617.58
8.1.10.0040.00417.52
8.1.00.0040.00417.42
8.0.300.0040.00419.96
8.0.290.0040.00416.60
8.0.280.0000.00718.44
8.0.270.0040.00417.24
8.0.260.0030.00316.76
8.0.250.0060.00316.87
8.0.240.0000.00716.88
8.0.230.0030.00316.90
8.0.220.0030.00316.85
8.0.210.0000.00716.88
8.0.200.0030.00316.76
8.0.190.0000.00716.90
8.0.180.0000.00716.88
8.0.170.0000.00816.88
8.0.160.0030.00316.82
8.0.150.0030.00516.77
8.0.140.0000.00716.86
8.0.130.0030.00313.37
8.0.120.0080.00016.86
8.0.110.0040.00416.87
8.0.100.0050.00316.95
8.0.90.0080.00016.98
8.0.80.0110.00416.82
8.0.70.0050.00216.74
8.0.60.0000.00716.79
8.0.50.0080.00016.87
8.0.30.0100.01017.18
8.0.20.0080.01017.40
8.0.10.0000.00717.12
8.0.00.0110.00916.70
7.4.330.0050.00015.55
7.4.320.0030.00316.44
7.4.300.0000.00716.55
7.4.290.0030.00316.40
7.4.280.0000.00816.51
7.4.270.0030.00616.47
7.4.260.0000.00816.61
7.4.250.0030.00316.45
7.4.240.0030.00316.59
7.4.230.0040.00216.66
7.4.220.0000.00716.49
7.4.210.0090.00716.60
7.4.200.0040.00416.58
7.4.160.0100.01016.43
7.4.140.0100.00917.86
7.4.130.0120.00416.43
7.4.120.0100.00916.48
7.4.110.0120.00616.51
7.4.100.0110.00616.74
7.4.90.0080.00816.41
7.4.80.0130.00319.39
7.4.70.0040.01316.36
7.4.60.0100.01016.49
7.4.50.0070.00716.51
7.4.40.0040.01216.56
7.4.00.0060.01014.80
7.3.330.0050.00013.13
7.3.320.0000.00613.10
7.3.310.0030.00416.25
7.3.300.0030.00316.24
7.3.290.0000.00716.18
7.3.280.0080.00716.32
7.3.260.0130.00716.43
7.3.240.0090.00916.29
7.3.230.0060.01216.50
7.3.210.0120.00416.59
7.3.200.0080.01216.35
7.3.190.0060.00916.27
7.3.180.0060.00916.36
7.3.170.0040.01116.36
7.3.160.0120.00416.27
7.2.330.0110.00616.73
7.2.320.0070.01016.61
7.2.310.0070.01016.45
7.2.300.0170.00016.54
7.2.290.0120.01216.65
7.2.60.0070.00717.05
7.2.30.0110.01517.88
7.2.20.0110.00917.77
7.2.10.0130.01417.44
7.2.00.0100.01217.85
7.1.200.0070.00315.76
7.1.150.0100.01416.57
7.1.140.0120.00816.63
7.1.130.0090.01616.39
7.1.120.0130.01316.54
7.1.110.0110.01116.23
7.1.100.0100.01416.01
7.1.90.0110.01016.21
7.1.80.0110.01316.06
7.1.70.0110.00815.31
7.1.60.0920.01133.38
7.1.50.0280.01332.98
7.1.40.0350.01532.61
7.1.30.0320.01532.74
7.1.20.0460.01432.88
7.1.10.0090.01214.75
7.1.00.0070.01214.99

preferences:
77.15 ms | 400 KiB | 5 Q