3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newArray = array ( 0 => 0.393, 1 => 0.769, 2 => 0.189, 3 => 0, 4 => 0, 5 => 0.349, 6 => 0.686, 7 => 0.168, 8 => 0, 9 => 0, 10 => 0.272, 11 => 0.534, 12 => 0.131, 13 => 1, 14 => 0 ); $out = array(); foreach ($newArray as $key => $value) { if ($key % 5 < 3) $out[] = $value; } print_r($out);

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.5.00.0120.00919.80
8.4.150.0020.00014.05
8.4.140.0120.00917.38
8.4.130.0080.00518.75
8.4.120.0070.00424.11
8.4.110.0150.00518.64
8.4.100.0140.00918.99
8.4.90.0060.00220.54
8.4.80.0120.00618.57
8.4.70.0120.00718.03
8.4.60.0120.00718.85
8.4.50.0050.00418.60
8.4.40.0030.01617.71
8.4.30.0110.01020.50
8.4.20.0130.00724.34
8.4.10.0090.00619.64
8.3.280.0150.00518.41
8.3.270.0120.00816.75
8.3.260.0020.00916.67
8.3.250.0100.00719.15
8.3.240.0080.01117.07
8.3.230.0090.00816.75
8.3.220.0140.00418.89
8.3.210.0070.01218.48
8.3.200.0050.00416.77
8.3.190.0050.00317.25
8.3.180.0130.00516.39
8.3.170.0150.00318.92
8.3.160.0040.01417.29
8.3.150.0070.00719.29
8.3.140.0000.00816.71
8.3.130.0030.00616.79
8.3.120.0070.00320.86
8.3.110.0000.00916.76
8.3.100.0000.01016.76
8.3.90.0080.00026.77
8.3.80.0030.00619.36
8.3.70.0120.00318.38
8.3.60.0150.00616.50
8.3.50.0120.00723.74
8.3.40.0110.00420.05
8.3.30.0070.00718.54
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0000.00926.16
8.2.290.0050.00320.33
8.2.280.0110.00718.40
8.2.270.0060.01216.91
8.2.260.0000.00818.22
8.2.250.0080.00018.54
8.2.240.0060.00316.36
8.2.230.0040.00420.94
8.2.220.0040.00424.06
8.2.210.0120.00326.77
8.2.200.0030.00618.88
8.2.190.0090.00616.58
8.2.180.0090.00925.92
8.2.170.0130.00319.09
8.2.160.0040.01822.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00426.35
8.2.110.0090.00020.49
8.2.100.0070.00417.72
8.2.90.0080.00017.75
8.2.80.0030.00618.78
8.2.70.0100.00317.38
8.2.60.0000.00818.05
8.2.50.0000.00818.05
8.2.40.0040.00419.88
8.2.30.0000.00718.01
8.2.20.0000.00718.02
8.2.10.0000.00819.29
8.2.00.0040.00419.35
8.1.330.0050.00722.05
8.1.320.0100.01016.12
8.1.310.0070.01020.07
8.1.300.0040.00418.44
8.1.290.0040.00430.84
8.1.280.0160.00025.92
8.1.270.0080.00023.99
8.1.260.0000.00828.09
8.1.250.0050.00328.09
8.1.240.0070.00318.79
8.1.230.0060.00617.89
8.1.220.0080.00017.79
8.1.210.0030.00518.77
8.1.200.0120.00017.23
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0070.00018.88
8.1.160.0060.00318.95
8.1.150.0000.00818.88
8.1.140.0000.00818.90
8.1.130.0030.00320.04
8.1.120.0000.00717.45
8.1.110.0000.00817.45
8.1.100.0040.00417.41
8.1.90.0040.00417.46
8.1.80.0040.00417.49
8.1.70.0040.00417.46
8.1.60.0040.00417.61
8.1.50.0080.00017.53
8.1.40.0050.00217.39
8.1.30.0030.00517.74
8.1.20.0000.00817.57
8.1.10.0000.00817.46
8.1.00.0030.00517.48
8.0.300.0000.00818.77
8.0.290.0070.00016.88
8.0.280.0030.00318.44
8.0.270.0000.00818.00
8.0.260.0030.00318.50
8.0.250.0090.00016.87
8.0.240.0030.00316.97
8.0.230.0000.00716.93
8.0.220.0030.00316.85
8.0.210.0000.00816.86
8.0.200.0070.00016.91
8.0.190.0040.00416.95
8.0.180.0040.00416.93
8.0.170.0030.00616.79
8.0.160.0070.00016.77
8.0.150.0000.00816.91
8.0.140.0000.00716.74
8.0.130.0040.00413.34
8.0.120.0000.00816.83
8.0.110.0030.00616.95
8.0.100.0000.00716.76
8.0.90.0040.00416.91
8.0.80.0050.01016.83
8.0.70.0030.00616.91
8.0.60.0000.00816.93
8.0.50.0000.00716.75
8.0.30.0150.00416.84
8.0.20.0090.00917.03
8.0.10.0000.00716.88
8.0.00.0090.00816.63
7.4.330.0000.00515.55
7.4.320.0000.00616.52
7.4.300.0030.00316.52
7.4.290.0040.00416.42
7.4.280.0040.00416.39
7.4.270.0000.00616.36
7.4.260.0000.00513.27
7.4.250.0000.00716.49
7.4.240.0030.00616.53
7.4.230.0030.00316.50
7.4.220.0040.00416.36
7.4.210.0080.00916.49
7.4.200.0050.00316.66
7.4.130.0080.01016.63
7.4.120.0130.01016.55
7.4.110.0100.00716.58
7.4.100.0120.00416.56
7.4.90.0100.01016.58
7.4.80.0000.01716.37
7.4.70.0070.01816.51
7.4.60.0130.00516.30
7.4.50.0080.00816.39
7.4.40.0080.00816.32
7.4.30.0150.00616.43
7.4.20.0160.00316.47
7.4.10.0080.00816.39
7.4.00.0070.01016.39
7.3.330.0000.00716.19
7.3.320.0020.00213.16
7.3.310.0000.00716.32
7.3.300.0040.00416.25
7.3.290.0080.00916.31
7.3.260.0140.00416.54
7.3.230.0080.00816.17
7.3.220.0030.01316.41
7.3.210.0030.01416.56
7.3.200.0110.00516.50
7.3.190.0110.00816.61
7.3.180.0100.00716.45
7.3.170.0080.00816.36
7.3.160.0110.00416.16
7.3.150.0060.00916.49
7.3.140.0070.01016.20
7.3.130.0060.01016.69
7.3.120.0120.00416.19
7.3.110.0190.00716.27
7.3.100.0030.02016.39
7.3.90.0040.01216.48
7.3.80.0140.00316.34
7.3.70.0120.00416.52
7.3.60.0140.00316.19
7.3.50.0060.01216.31
7.3.40.0150.00616.19
7.3.30.0090.01216.29
7.3.20.0210.01416.30
7.3.10.0070.01116.39
7.3.00.0100.01316.41
7.2.330.0070.01116.79
7.2.320.0090.00916.39
7.2.310.0110.00816.37
7.2.300.0070.01016.76
7.2.290.0080.00816.74
7.2.280.0030.01316.80
7.2.270.0060.01016.31
7.2.260.0040.01316.33
7.2.250.0120.00616.40
7.2.240.0140.01016.72
7.2.230.0030.01416.59
7.2.220.0130.00316.72
7.2.210.0090.00916.37
7.2.200.0070.01016.45
7.2.190.0140.00316.43
7.2.180.0060.01116.71
7.2.170.0130.01016.45
7.2.160.0160.00616.63
7.2.150.0120.00616.50
7.2.140.0070.01716.76
7.2.130.0140.01016.68
7.2.120.0090.01516.34
7.2.110.0380.01016.54
7.2.100.0090.01516.51
7.2.90.0150.00316.44
7.2.80.0070.01016.57
7.2.70.0070.01716.70
7.2.60.0240.00016.67
7.2.50.0100.01416.49
7.2.40.0100.01316.63
7.2.30.0060.01616.77
7.2.20.0150.00916.44
7.2.10.0060.01816.59
7.2.00.0090.00916.55

preferences:
199.35 ms | 403 KiB | 5 Q