3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('first'=>'111', 'second'=>'222', 'third'=>'333'); // get the first key: returns 'first' print array_shift(array_keys($array)); // get the last key: returns 'third' print array_pop(array_keys($array)); // get the first value: returns '111' print array_shift(array_values($array)); // get the last value: returns '333' print array_pop(array_values($array));<?php

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)
5.4.320.0430.06719.04
5.4.310.0470.04719.13
5.4.300.0470.06319.05
5.4.290.0330.04319.14
5.4.280.0530.04319.22
5.4.270.0330.05318.93
5.4.260.0400.06719.10
5.4.250.0330.04718.95
5.4.240.0330.04718.93
5.4.230.0430.06719.14
5.4.220.0370.04718.93
5.4.210.0270.04019.18
5.4.200.0500.06319.22
5.4.190.0430.05719.14
5.4.180.0370.05319.21
5.4.170.0400.06319.12
5.4.160.0430.05318.92
5.4.150.0400.06319.22
5.4.140.0300.06016.41
5.4.130.0500.04016.40
5.4.120.0430.05716.45
5.4.110.0500.05716.51
5.4.100.0400.05316.64
5.4.90.0530.05316.48
5.4.80.0470.05316.20
5.4.70.0430.06316.48
5.4.60.0400.05316.53
5.4.50.0370.04316.41
5.4.40.0370.03316.43
5.4.30.0470.05316.53
5.4.20.0470.06316.45
5.4.10.0370.05016.46
5.4.00.0400.03715.79
5.3.290.0370.03714.76
5.3.280.0330.07014.39
5.3.270.0430.06714.53
5.3.260.0500.06014.54
5.3.250.0370.05014.63
5.3.240.0430.06014.62
5.3.230.0470.06014.52
5.3.220.0400.05014.66
5.3.210.0470.06314.52
5.3.200.0400.06314.55
5.3.190.0430.05314.36
5.3.180.0470.06714.45
5.3.170.0430.07014.47
5.3.160.0330.03714.54
5.3.150.0270.04314.45
5.3.140.0370.03314.49
5.3.130.0500.06714.53
5.3.120.0470.06714.37
5.3.110.0500.06314.49
5.3.100.0430.07313.96
5.3.90.0470.07013.96
5.3.80.0400.06713.84
5.3.70.0370.05713.96
5.3.60.0400.03013.80
5.3.50.0370.05713.89
5.3.40.0470.05713.89
5.3.30.0470.03713.85
5.3.20.0400.04313.62
5.3.10.0230.05313.63
5.3.00.0430.02713.46
5.2.170.0300.03311.30
5.2.160.0430.03711.23
5.2.150.0430.05011.00
5.2.140.0330.06311.22
5.2.130.0400.05311.19
5.2.120.0370.05011.05
5.2.110.0270.03710.92
5.2.100.0300.02711.19
5.2.90.0300.02710.93
5.2.80.0230.03311.06
5.2.70.0400.04010.95
5.2.60.0370.03710.99
5.2.50.0370.05710.95
5.2.40.0300.03310.89
5.2.30.0370.02310.86
5.2.20.0330.05310.96
5.2.10.0370.05010.86
5.2.00.0270.02710.74
5.1.60.0200.0279.96
5.1.50.0300.04310.07
5.1.40.0300.0309.98
5.1.30.0230.04010.34
5.1.20.0270.02710.38
5.1.10.0300.05010.13
5.1.00.0300.05010.05
5.0.50.0170.0308.46
5.0.40.0130.0378.45
5.0.30.0200.0608.20
5.0.20.0130.0408.16
5.0.10.0130.0408.23
5.0.00.0200.0338.31
4.4.90.0130.0207.54
4.4.80.0070.0277.54
4.4.70.0200.0307.54
4.4.60.0100.0307.54
4.4.50.0200.0237.54
4.4.40.0200.0437.54
4.4.30.0200.0237.54
4.4.20.0170.0177.54
4.4.10.0130.0207.54
4.4.00.0170.0237.54
4.3.110.0100.0337.54
4.3.100.0170.0177.54
4.3.90.0200.0137.54
4.3.80.0130.0337.54
4.3.70.0170.0107.54
4.3.60.0100.0207.54
4.3.50.0170.0377.54
4.3.40.0130.0507.54
4.3.30.0070.0377.54
4.3.20.0100.0207.54
4.3.10.0100.0207.54
4.3.00.0070.0337.54

preferences:
142.18 ms | 1394 KiB | 7 Q