3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a', 'b', 'c']; var_dump(current($arr)); echo '--------aaaaaa--------', PHP_EOL; var_dump(end($arr)); var_dump(next($arr)); $abc = $arr; echo '--------bbbbbbb--------', PHP_EOL; var_dump(current($abc)); // false var_dump(current($abc)); // false var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? var_dump(each($abc)); // not false??? echo '--------cccccccc--------', 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.1.130.0080.00318.77
8.1.120.0000.00717.30
8.1.110.0080.00017.43
8.1.100.0040.00417.40
8.1.90.0070.00017.38
8.1.80.0070.00017.39
8.1.70.0030.00317.30
8.1.60.0020.00517.59
8.1.50.0000.00817.55
8.1.40.0000.00717.44
8.1.30.0050.00317.60
8.1.20.0040.00417.65
8.1.10.0000.00817.48
8.1.00.0080.00017.51
8.0.260.0040.00418.88
8.0.250.0040.00416.94
8.0.240.0040.00416.96
8.0.230.0040.00416.93
8.0.220.0030.00316.74
8.0.210.0000.00716.92
8.0.200.0000.00716.95
8.0.190.0040.00416.98
8.0.180.0040.00416.79
8.0.170.0040.00416.94
8.0.160.0020.00516.79
8.0.150.0040.00416.79
8.0.140.0050.00216.89
8.0.130.0080.00013.34
8.0.120.0040.00416.83
8.0.110.0000.00716.79
8.0.100.0070.00016.96
8.0.90.0000.00716.73
8.0.80.0060.01316.89
8.0.70.0040.00416.69
8.0.60.0000.00816.88
8.0.50.0000.00816.73
8.0.30.0120.00717.09
8.0.20.0060.01217.40
8.0.10.0030.00616.89
8.0.00.0090.00916.94
7.4.330.0050.00015.55
7.4.320.0060.00016.57
7.4.300.0000.00616.50
7.4.290.0080.00416.42
7.4.280.0060.00316.51
7.4.270.0000.00716.52
7.4.260.0040.00416.49
7.4.250.0040.00416.38
7.4.240.0040.00416.56
7.4.230.0080.00016.55
7.4.220.0110.00816.45
7.4.210.0070.00716.52
7.4.200.0070.00016.31
7.4.160.0100.00916.48
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0190.00316.46
7.4.120.0120.00916.52
7.4.110.0030.01416.53
7.4.100.0060.01016.36
7.4.90.0160.00316.47
7.4.80.0160.00319.39
7.4.70.0060.01116.52
7.4.60.0030.01316.39
7.4.50.0030.01216.30
7.4.40.0140.00716.46
7.4.30.0090.00916.36
7.4.00.0090.00614.62
7.3.330.0000.00513.24
7.3.320.0060.00013.06
7.3.310.0030.00316.22
7.3.300.0000.00716.24
7.3.290.0060.00816.27
7.3.280.0060.01116.29
7.3.270.0070.01017.40
7.3.260.0120.01016.34
7.3.250.0090.00916.48
7.3.240.0120.00916.26
7.3.230.0070.01016.47
7.3.210.0090.00916.27
7.3.200.0120.00616.51
7.3.190.0150.00416.35
7.3.180.0110.00616.36
7.3.170.0160.00316.25
7.3.160.0080.00816.42
7.2.330.0130.00416.25
7.2.320.0110.00716.46
7.2.310.0170.00016.39
7.2.300.0100.01316.37
7.2.290.0140.00316.59
7.2.80.0110.00416.16
7.2.60.0000.01016.94
7.2.00.0030.01019.34
7.1.200.0000.01415.79
7.1.70.0000.00817.09
7.1.60.0100.00317.05
7.1.50.0100.00316.84
7.1.40.0040.00716.56
7.1.30.0110.00016.58
7.1.20.0090.00916.71
7.1.10.0070.00316.61
7.1.00.0040.00416.81
7.0.200.0040.00416.55
7.0.190.0030.00516.59
7.0.180.0000.00816.07
7.0.170.0000.00816.04
7.0.160.0030.01316.10
7.0.150.0040.01216.34
7.0.140.0040.00416.41
7.0.130.0000.00816.54
7.0.120.0000.00816.52
7.0.110.0110.00716.14
7.0.100.0050.00516.13
7.0.90.0040.00416.27
7.0.80.0040.00416.24
7.0.70.0040.00416.18
7.0.60.0000.00816.23
7.0.50.0060.00316.31
7.0.40.0060.00314.35
7.0.30.0000.00714.38
7.0.20.0040.00414.42
7.0.10.0000.00814.46
7.0.00.0000.00814.32

preferences:
49.38 ms | 406 KiB | 5 Q