3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['element1', 'element2', 'element3', 'element4']; $i = 0; do { if ($i != 1) { echo $array[$i] . PHP_EOL; } $i++; } while ($i < count($array)); foreach ($array as $key => $value) { if ($key != 1) { echo $value . PHP_EOL; } } ?>

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.0150.00618.18
8.3.50.0140.00716.62
8.3.40.0040.01120.32
8.3.30.0100.00320.90
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.180.0030.01718.51
8.2.170.0090.00619.01
8.2.160.0100.00322.96
8.2.150.0030.00525.66
8.2.140.0000.00724.66
8.2.130.0050.00226.16
8.2.120.0040.00419.48
8.2.110.0040.00421.05
8.2.100.0080.00417.84
8.2.90.0060.00318.03
8.2.80.0080.00018.16
8.2.70.0090.00017.50
8.2.60.0120.00717.35
8.2.50.0140.00517.38
8.2.40.0090.00717.37
8.2.30.0140.00417.50
8.2.20.0150.00217.56
8.2.10.0100.00617.50
8.2.00.0060.01117.44
8.1.280.0090.00925.92
8.1.270.0030.00524.66
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0100.00023.80
8.1.230.0090.00320.99
8.1.220.0040.00417.74
8.1.210.0030.00519.02
8.1.200.0060.00317.36
8.1.190.0130.00417.12
8.1.180.0140.00316.97
8.1.170.0140.00317.13
8.1.160.0110.00617.23
8.1.150.0140.00317.05
8.1.140.0110.00817.06
8.1.130.0130.00617.19
8.1.120.0150.00217.13
8.1.110.0100.00617.17
8.1.100.0120.00517.24
8.1.90.0100.00617.06
8.1.80.0130.00517.31
8.1.70.0090.00717.12
8.1.60.0140.00417.44
8.1.50.0120.00617.25
8.1.40.0170.00117.19
8.1.30.0150.00417.38
8.1.20.0140.00417.31
8.1.10.0110.00717.36
8.1.00.0150.00417.38
8.0.300.0090.00019.99
8.0.290.0040.00416.75
8.0.280.0130.00316.61
8.0.270.0100.00716.57
8.0.260.0070.01016.52
8.0.250.0130.00316.74
8.0.240.0100.00716.55
8.0.230.0120.00616.57
8.0.220.0130.00416.63
8.0.210.0120.00516.57
8.0.200.0130.00416.68
8.0.190.0090.00816.63
8.0.180.0130.00416.57
8.0.170.0130.00516.69
8.0.160.0110.00616.52
8.0.150.0140.00416.69
8.0.140.0130.00416.52
8.0.130.0120.00616.52
8.0.120.0180.00116.56
8.0.110.0120.00516.52
8.0.100.0150.00216.63
8.0.90.0110.00616.63
8.0.80.0080.00916.57
8.0.70.0120.00416.57
8.0.60.0110.00516.52
8.0.50.0150.00216.52
8.0.30.0120.00416.52
8.0.20.0110.00616.63
8.0.10.0140.00316.74

preferences:
33.06 ms | 400 KiB | 5 Q