3v4l.org

run code in 300+ PHP versions simultaneously
$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)
8.3.60.0070.00716.50
8.3.50.0080.01122.99
8.3.40.0040.01118.77
8.3.30.0100.00318.96
8.3.20.0040.00420.16
8.3.10.0070.00320.28
8.3.00.0040.00419.26
8.2.180.0140.00016.63
8.2.170.0120.00622.96
8.2.160.0150.00020.40
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0030.00521.09
8.2.110.0060.00320.38
8.2.100.0040.00817.59
8.2.90.0070.00018.97
8.2.80.0040.00417.97
8.2.70.0050.00317.49
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0000.00819.48
8.2.20.0040.00417.53
8.2.10.0040.00417.92
8.2.00.0040.00417.50
8.1.280.0100.00325.92
8.1.270.0090.00023.80
8.1.260.0050.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0110.00024.05
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.00
8.1.190.0040.00417.11
8.1.180.0030.00518.10
8.1.170.0030.00618.61
8.1.160.0070.00021.93
8.1.150.0040.00418.74
8.1.140.0060.00317.30
8.1.130.0040.00417.80
8.1.120.0000.00717.33
8.1.110.0050.00317.31
8.1.100.0030.00517.27
8.1.90.0000.00717.21
8.1.80.0030.00317.30
8.1.70.0000.00717.29
8.1.60.0000.00717.46
8.1.50.0040.00417.26
8.1.40.0070.00017.25
8.1.30.0090.00017.32
8.1.20.0040.00417.38
8.1.10.0050.00317.43
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0030.00318.37
8.0.270.0070.00017.13
8.0.260.0000.00617.13
8.0.250.0030.00316.69
8.0.240.0000.00916.88
8.0.230.0030.00316.70
8.0.220.0030.00316.76
8.0.210.0070.00016.68
8.0.200.0000.00716.77
8.0.190.0000.00716.83
8.0.180.0040.00416.83
8.0.170.0000.00816.78
8.0.160.0070.00016.71
8.0.150.0000.00716.75
8.0.140.0000.00716.61
8.0.130.0050.00013.24
8.0.120.0000.00816.75
8.0.110.0030.00316.68
8.0.100.0030.00316.86
8.0.90.0020.00516.64
8.0.80.0090.00616.79
8.0.70.0060.00316.55
8.0.60.0050.00316.70
8.0.50.0000.00716.59
8.0.30.0070.01117.00
8.0.20.0110.00717.40
8.0.10.0000.00816.92
8.0.00.0080.01016.60
7.4.330.0050.00015.00
7.4.320.0000.00616.45
7.4.300.0030.00316.28
7.4.290.0070.00016.51
7.4.280.0090.00016.29
7.4.270.0040.00416.35
7.4.260.0030.00316.47
7.4.250.0050.00216.43
7.4.240.0030.00316.33
7.4.230.0000.00716.55
7.4.220.0130.00616.45
7.4.210.0070.01116.43
7.4.200.0050.00316.39
7.4.160.0090.00916.21
7.4.150.0120.01317.40
7.4.140.0150.00617.86
7.4.130.0060.01216.47
7.4.120.0100.01016.23
7.4.110.0050.01016.14
7.4.100.0100.00716.40
7.4.90.0100.00716.41
7.4.80.0110.00719.39
7.4.70.0090.00916.43
7.4.60.0100.00716.32
7.4.50.0080.00016.47
7.4.40.0030.01316.32
7.4.30.0030.01316.21
7.3.330.0030.00312.93
7.3.320.0030.00313.01
7.3.310.0000.00716.18
7.3.300.0060.00015.96
7.3.290.0060.00916.16
7.3.280.0070.00816.14
7.3.270.0130.00717.40
7.3.260.0100.00716.23
7.3.250.0110.00616.26
7.3.240.0150.00616.18
7.3.230.0150.00916.39
7.3.210.0080.00816.29
7.3.200.0040.01819.39
7.3.190.0070.01416.45
7.3.180.0160.00016.37
7.3.170.0150.00816.27
7.3.160.0110.00416.20
7.2.330.0140.00316.52
7.2.320.0030.01316.61
7.2.310.0100.01416.35
7.2.300.0080.01116.14
7.2.290.0120.00416.61
5.4.320.0070.03512.45
5.4.310.0060.04412.45
5.4.300.0070.03512.45
5.4.290.0060.03812.45
5.4.280.0100.03912.34
5.4.270.0090.03912.35
5.4.260.0080.04612.34
5.4.250.0110.03812.34
5.4.240.0070.04112.35
5.4.230.0070.04412.34
5.4.220.0050.04212.34
5.4.210.0100.03512.34
5.4.200.0100.03612.34
5.4.190.0110.03912.33
5.4.180.0090.03812.34
5.4.170.0040.03912.34
5.4.160.0040.03912.34
5.4.150.0060.03712.34
5.4.140.0050.04312.02
5.4.130.0090.03312.01
5.4.120.0060.03511.96
5.4.110.0130.03111.96
5.4.100.0090.03311.96
5.4.90.0070.04111.96
5.4.80.0070.04211.96
5.4.70.0070.03411.96
5.4.60.0130.02911.96
5.4.50.0060.03511.96
5.4.40.0080.04011.95
5.4.30.0110.04311.95
5.4.20.0060.04011.95
5.4.10.0060.03911.95
5.4.00.0060.03611.43
5.3.290.0060.04212.80
5.3.280.0120.03812.71
5.3.270.0080.04712.73
5.3.260.0120.04512.71
5.3.250.0080.03912.72
5.3.240.0090.03612.72
5.3.230.0090.04512.71
5.3.220.0100.03512.68
5.3.210.0100.03812.68
5.3.200.0090.04012.68
5.3.190.0060.03812.67
5.3.180.0130.03912.68
5.3.170.0080.04112.66
5.3.160.0080.04212.68
5.3.150.0110.04312.67
5.3.140.0050.03912.66
5.3.130.0090.04112.66
5.3.120.0050.04112.66
5.3.110.0120.03412.66
5.3.100.0080.03612.12
5.3.90.0080.03712.08
5.3.80.0070.03612.07
5.3.70.0090.04012.08
5.3.60.0050.03712.07
5.3.50.0090.03312.00
5.3.40.0080.03712.00
5.3.30.0070.03411.94
5.3.20.0070.03411.72
5.3.10.0070.04111.69
5.3.00.0040.03811.68
5.2.170.0050.0339.17
5.2.160.0080.0319.18
5.2.150.0090.0339.17
5.2.140.0050.0389.17
5.2.130.0100.0259.13
5.2.120.0050.0329.13
5.2.110.0050.0319.14
5.2.100.0070.0369.13
5.2.90.0060.0299.13
5.2.80.0040.0329.13
5.2.70.0040.0329.13
5.2.60.0070.0299.09
5.2.50.0040.0319.05
5.2.40.0040.0299.03
5.2.30.0030.0339.00
5.2.20.0090.0279.00
5.2.10.0050.0338.92
5.2.00.0060.0328.77
5.1.60.0060.0228.05
5.1.50.0050.0248.05
5.1.40.0020.0278.04
5.1.30.0050.0258.39
5.1.20.0040.0298.41
5.1.10.0100.0328.13
5.1.00.0060.0288.13
5.0.50.0040.0246.61
5.0.40.0050.0216.47
5.0.30.0030.0316.28
5.0.20.0030.0196.25
5.0.10.0030.0236.23
5.0.00.0020.0316.23
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0030.0184.75
4.4.60.0020.0214.75
4.4.50.0010.0174.77
4.4.40.0030.0254.71
4.4.30.0020.0194.76
4.4.20.0020.0174.85
4.4.10.0010.0174.85
4.4.00.0020.0324.76
4.3.110.0020.0164.67
4.3.100.0040.0154.66
4.3.90.0030.0164.64
4.3.80.0040.0274.59
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0030.0164.63
4.3.40.0030.0244.54
4.3.30.0010.0173.28
4.3.20.0010.0173.25
4.3.10.0010.0173.22
4.3.00.0000.01318.16

preferences:
43.78 ms | 401 KiB | 5 Q