3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['ka' => 'va', 'kb' => 'vb', 'kc' => 'vc']; $part = array_slice($arr, 1, 1, true); $key = key($part); $value = current($part); var_dump($arr, $part, $key, $value);

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.4.20.0100.01018.09
8.4.10.0100.00017.47
8.3.150.0110.00720.82
8.3.140.0100.01016.28
8.3.130.0040.00418.23
8.3.120.0050.00518.82
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0040.00418.31
8.3.70.0160.00318.30
8.3.60.0150.00318.18
8.3.50.0050.01418.14
8.3.40.0080.00818.68
8.3.30.0080.00818.59
8.3.20.0030.00618.80
8.3.10.0080.00019.16
8.3.00.0040.00423.60
8.2.260.0120.00618.22
8.2.250.0080.00816.66
8.2.240.0000.00918.61
8.2.230.0030.00622.58
8.2.220.0090.00637.54
8.2.210.0030.00526.77
8.2.200.0060.00316.25
8.2.190.0140.00016.58
8.2.180.0040.01218.41
8.2.170.0110.00418.78
8.2.160.0160.00318.86
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0090.00019.11
8.2.110.0070.00320.92
8.2.100.0090.00318.22
8.2.90.0030.00517.91
8.2.80.0040.00417.97
8.2.70.0040.00417.89
8.2.60.0080.00018.09
8.2.50.0080.00018.10
8.2.40.0070.00019.26
8.2.30.0000.00819.39
8.2.20.0070.00018.10
8.2.10.0030.00318.16
8.2.00.0000.00719.22
8.1.310.0060.00316.59
8.1.300.0030.00718.39
8.1.290.0030.00630.84
8.1.280.0110.00425.92
8.1.270.0050.00322.00
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0140.01022.51
8.1.230.0080.00422.57
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0080.00017.23
8.1.180.0030.00618.10
8.1.170.0000.00818.57
8.1.160.0050.00218.85
8.1.150.0040.00418.86
8.1.140.0070.00017.56
8.1.130.0000.00720.79
8.1.120.0050.00317.39
8.1.110.0050.00217.36
8.1.100.0080.00017.43
8.1.90.0040.00417.29
8.1.80.0000.00717.42
8.1.70.0080.00417.28
8.1.60.0000.00717.49
8.1.50.0110.00017.35
8.1.40.0050.00317.36
8.1.30.0000.00817.59
8.1.20.0040.00417.53
8.1.10.0050.00317.46
8.1.00.0030.00517.34
8.0.300.0040.00419.64
8.0.290.0080.00016.75
8.0.280.0030.00318.27
8.0.270.0000.00716.83
8.0.260.0060.00017.07
8.0.250.0030.00316.86
8.0.240.0080.00016.78
8.0.230.0040.00416.92
8.0.220.0040.00416.78
8.0.210.0000.00716.75
8.0.200.0000.00716.92
8.0.190.0070.00016.83
8.0.180.0040.00416.92
8.0.170.0030.00516.72
8.0.160.0000.00716.82
8.0.150.0030.00516.77
8.0.140.0030.00416.78
8.0.130.0030.00513.20
8.0.120.0000.00716.67
8.0.110.0040.00416.76
8.0.100.0000.00716.72
8.0.90.0040.00416.63
8.0.80.0080.00816.80
8.0.70.0000.00716.69
8.0.60.0000.00816.88
8.0.50.0030.00516.86
8.0.30.0090.00916.93
8.0.20.0120.01017.40
8.0.10.0000.00816.94
8.0.00.0080.01116.75
7.4.330.0030.00315.55
7.4.320.0060.00016.45
7.4.300.0000.00616.41
7.4.290.0040.00416.53
7.4.280.0030.00616.53
7.4.270.0000.00716.45
7.4.260.0030.00316.31
7.4.250.0000.00716.48
7.4.240.0030.00316.50
7.4.230.0070.00016.63
7.4.220.0040.00416.35
7.4.210.0050.01016.45
7.4.200.0000.00716.48
7.4.160.0120.00616.38
7.4.140.0100.01117.86
7.4.130.0120.00616.56
7.4.120.0100.01016.39
7.4.110.0000.01716.44
7.4.100.0050.01416.42
7.4.90.0080.00816.43
7.4.80.0030.01519.39
7.4.70.0150.00916.43
7.4.60.0130.00316.35
7.4.50.0060.01016.40
7.4.40.0150.00616.41
7.4.00.0120.00314.68
7.3.330.0000.00612.93
7.3.320.0030.00313.01
7.3.310.0000.00816.04
7.3.300.0080.00016.13
7.3.290.0030.00316.10
7.3.280.0100.00816.10
7.3.260.0130.00416.18
7.3.240.0110.00716.14
7.3.230.0070.01016.16
7.3.210.0060.01216.38
7.3.200.0100.00716.25
7.3.190.0070.01416.12
7.3.180.0100.00716.25
7.3.170.0110.00616.37
7.3.160.0130.00316.54
7.3.120.0060.00914.38
7.3.110.0080.00614.53
7.3.100.0070.01014.61
7.3.90.0070.00714.71
7.3.80.0000.01614.62
7.3.70.0100.00714.75
7.3.60.0140.00014.54
7.3.50.0070.00714.83
7.3.40.0070.00714.69
7.3.30.0000.01014.69
7.3.20.0040.00716.32
7.3.10.0030.01016.51
7.3.00.0000.01516.44
7.2.330.0100.01416.57
7.2.320.0120.00616.61
7.2.310.0060.00916.40
7.2.300.0060.01316.48
7.2.290.0070.01016.54
7.2.250.0030.01614.48
7.2.240.0030.01214.80
7.2.230.0080.00814.75
7.2.220.0060.00314.98
7.2.210.0130.00315.08
7.2.200.0060.00914.71
7.2.190.0000.00914.80
7.2.180.0040.01414.78
7.2.170.0030.00914.71
7.2.160.0060.00614.71
7.2.150.0000.00916.70
7.2.140.0070.00716.61
7.2.130.0030.00716.60
7.2.120.0030.01316.75
7.2.110.0030.00916.68
7.2.100.0040.01116.74
7.2.90.0070.00716.92
7.2.80.0070.01116.80
7.2.70.0610.00915.36
7.2.60.0400.00615.76
7.2.50.0390.00615.75
7.2.40.0360.00915.57
7.2.30.0380.00815.64
7.2.20.0390.00815.51
7.2.10.0420.00615.65
7.2.00.0130.00615.77
7.1.330.0040.01415.80
7.1.320.0030.01015.38
7.1.310.0000.01315.64
7.1.300.0030.00915.53
7.1.290.0080.00015.58
7.1.280.0070.00715.58
7.1.270.0030.00915.62
7.1.260.0000.01815.71
7.1.250.0070.00615.50
7.1.240.0070.00715.72
7.1.230.0150.00015.61
7.1.220.0030.01015.61
7.1.210.0060.00615.60
7.1.200.0080.00715.70
7.1.190.0080.00015.86
7.1.180.0000.01315.44
7.1.170.0370.00814.62
7.1.160.0360.00614.60
7.1.150.0350.01214.44
7.1.140.0410.00714.49
7.1.130.0440.00514.73
7.1.120.0440.00814.57
7.1.110.0070.00914.44
7.1.100.0410.00614.49
7.1.90.0110.00614.74
7.1.80.0060.01414.77
7.1.70.0580.00514.51
7.1.60.0170.00923.55
7.1.50.0570.01023.62
7.1.40.0150.01023.69
7.1.30.0560.00623.41
7.1.20.0290.00823.78
7.1.10.0560.00414.76
7.1.00.0210.01014.51
7.0.330.0000.01215.17
7.0.320.0080.00515.32
7.0.310.0090.00315.00
7.0.300.0000.01515.08
7.0.290.0070.00715.48
7.0.280.0040.01415.24
7.0.270.0040.00815.23
7.0.260.0090.00615.37
7.0.250.0060.00315.48
7.0.240.0000.01315.49
7.0.230.0040.01215.18
7.0.220.0070.01015.28
7.0.210.0070.00715.43
7.0.200.0100.00315.44
7.0.190.0060.00915.07
7.0.180.0040.00815.29
7.0.170.0140.00015.37
7.0.160.0030.00915.41
7.0.150.0140.00315.27
7.0.140.0070.01015.46
7.0.130.0070.00315.45
7.0.120.0060.00615.21
7.0.110.0080.00815.38
7.0.100.0130.00315.29
7.0.90.0030.00715.25
7.0.80.0070.00415.35
7.0.70.0070.00715.13
7.0.60.0120.00615.17
7.0.50.0000.01815.23
7.0.40.0110.00313.53
7.0.30.0090.00413.44
7.0.20.0030.00713.35
7.0.10.0080.00413.23
7.0.00.0040.01113.46
5.6.400.0040.01514.21
5.6.390.0060.00614.30
5.6.380.0030.00713.99
5.6.370.0070.01014.31
5.6.360.0000.01014.02
5.6.350.0120.00614.07
5.6.340.0040.00914.45
5.6.330.0030.01013.97
5.6.320.0000.00913.90
5.6.310.0030.01214.27
5.6.300.0070.00714.45
5.6.290.0030.00714.28
5.6.280.0030.00914.26
5.6.270.0060.00614.13
5.6.260.0000.01514.21
5.6.250.0000.01314.26
5.6.240.0070.00314.03
5.6.230.0030.01314.13
5.6.220.0080.00813.92
5.6.210.0070.01014.11
5.6.200.0060.01214.23
5.6.190.0110.00814.26
5.6.180.0070.00414.54
5.6.170.0030.01314.36
5.6.160.0030.01414.18
5.6.150.0000.01214.18
5.6.140.0030.00914.01
5.6.130.0070.01113.96
5.6.120.0040.01113.81
5.6.110.0060.00614.47
5.6.100.0100.00314.07
5.6.90.0040.00814.36
5.6.80.0090.00913.91
5.6.70.0030.01314.00
5.6.60.0100.00314.22
5.6.50.0060.00914.14
5.6.40.0070.00714.12
5.6.30.0030.00614.23
5.6.20.0040.00814.33
5.6.10.0060.00314.09
5.6.00.0030.00713.88

preferences:
29.69 ms | 403 KiB | 5 Q