3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1 => '5ive', 'jim' => 'bob', 4 => 5); end($array); echo 'Pointer is set to: ' . current($array) . "\n"; echo 'first item: ' . array_slice($array, 0, 1)[0] . "\n"; echo 'Pointer is set to: ' . current($array) . "\n";

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.0040.01118.40
8.3.50.0080.00822.04
8.3.40.0100.01018.54
8.3.30.0140.00018.66
8.3.20.0110.00718.51
8.3.10.0080.00021.13
8.3.00.0060.00319.69
8.2.180.0150.00318.54
8.2.170.0110.00422.96
8.2.160.0130.00020.58
8.2.150.0030.00524.18
8.2.140.0090.00624.66
8.2.130.0040.00426.16
8.2.120.0120.00621.05
8.2.110.0000.00922.10
8.2.100.0090.00317.84
8.2.90.0040.00419.35
8.2.80.0040.00419.46
8.2.70.0040.00417.38
8.2.60.0000.00918.05
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0040.00421.30
8.2.20.0040.00417.61
8.2.10.0040.00417.65
8.2.00.0000.00717.73
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0110.00426.35
8.1.250.0100.00328.09
8.1.240.0040.00422.42
8.1.230.0080.00320.91
8.1.220.0040.00418.77
8.1.210.0080.00018.80
8.1.200.0040.00417.35
8.1.190.0000.00817.40
8.1.180.0000.00818.10
8.1.170.0030.00518.67
8.1.160.0000.00818.88
8.1.150.0000.01018.66
8.1.140.0040.00417.38
8.1.130.0030.00317.72
8.1.120.0030.00317.39
8.1.110.0040.00417.36
8.1.100.0020.00517.44
8.1.90.0040.00417.43
8.1.80.0070.00017.50
8.1.70.0040.00417.42
8.1.60.0030.00617.60
8.1.50.0040.00417.50
8.1.40.0040.00417.54
8.1.30.0040.00417.50
8.1.20.0030.00517.70
8.1.10.0040.00417.43
8.1.00.0040.00417.46
8.0.300.0070.00020.07
8.0.290.0070.00017.18
8.0.280.0070.00018.47
8.0.270.0050.00317.16
8.0.260.0000.00716.72
8.0.250.0050.00316.88
8.0.240.0050.00316.89
8.0.230.0000.00716.82
8.0.220.0030.00316.85
8.0.210.0030.00316.89
8.0.200.0000.00816.79
8.0.190.0050.00316.98
8.0.180.0080.00016.81
8.0.170.0050.00316.92
8.0.160.0050.00216.84
8.0.150.0030.00616.80
8.0.140.0000.00816.82
8.0.130.0040.00413.34
8.0.120.0050.00316.84
8.0.110.0070.00016.78
8.0.100.0000.00716.81
8.0.90.0000.00816.75
8.0.80.0090.00616.91
8.0.70.0040.00416.77
8.0.60.0000.00716.65
8.0.50.0040.00416.82
8.0.30.0100.01017.06
8.0.20.0100.00917.40
8.0.10.0050.00217.05
8.0.00.0080.01016.69
7.4.330.0060.00016.70
7.4.320.0060.00016.41
7.4.300.0070.00016.44
7.4.290.0060.00016.53
7.4.280.0070.00016.51
7.4.270.0000.00616.46
7.4.260.0050.00013.21
7.4.250.0070.00016.50
7.4.240.0050.00316.55
7.4.230.0050.00316.56
7.4.220.0060.01216.55
7.4.210.0090.00716.40
7.4.200.0030.00316.46
7.4.190.0030.00316.42
7.4.160.0060.00916.47
7.4.150.0110.00617.40
7.4.140.0110.00817.86
7.4.130.0100.01016.55
7.4.120.0120.00516.45
7.4.110.0120.00616.24
7.4.100.0080.01516.45
7.4.90.0040.01416.38
7.4.80.0100.01319.39
7.4.70.0080.01216.48
7.4.60.0100.00716.54
7.4.50.0080.00016.55
7.4.40.0110.00422.77
7.4.30.0080.01116.29
7.4.00.0030.01214.57
7.3.330.0060.00213.05
7.3.320.0030.00313.14
7.3.310.0000.00716.22
7.3.300.0030.00316.24
7.3.290.0040.01816.24
7.3.280.0060.00916.25
7.3.270.0030.01417.40
7.3.260.0110.01118.24
7.3.250.0090.01116.27
7.3.240.0030.01316.54
7.3.230.0060.01216.51
7.3.210.0110.00616.30
7.3.200.0150.00619.39
7.3.190.0120.00916.23
7.3.180.0050.01016.39
7.3.170.0160.00316.27
7.3.160.0200.00316.30
7.3.120.0100.00714.70
7.2.330.0120.00616.34
7.2.320.0070.01016.66
7.2.310.0120.00616.68
7.2.300.0120.00616.48
7.2.290.0000.01616.70
7.2.60.0070.01016.89
7.2.00.0120.00619.36
7.1.200.0040.00815.92
7.1.100.0900.01016.13
7.1.70.0000.00817.04
7.1.60.0090.01319.24
7.1.50.0070.01316.81
7.1.00.0070.07322.51
7.0.200.0030.00316.50
7.0.140.0030.07322.01
7.0.100.0070.08019.91
7.0.90.0070.08019.89
7.0.80.0230.08019.94
7.0.70.0100.05319.87
7.0.60.0170.08319.93
7.0.50.0070.04320.31
7.0.40.0130.07720.14
7.0.30.0170.07720.13
7.0.20.0070.05320.11
7.0.10.0100.08019.99
7.0.00.0130.04319.95
5.6.280.0000.07721.10
5.6.250.0130.08020.56
5.6.240.0030.09020.61
5.6.230.0070.08720.55
5.6.220.0130.06020.61
5.6.210.0070.08320.55
5.6.200.0100.07721.04
5.6.190.0200.07321.10
5.6.180.0100.06320.93
5.6.170.0130.03721.08
5.6.160.0130.07021.10
5.6.150.0070.10321.05
5.6.140.0070.06321.13
5.6.130.0130.08321.04
5.6.120.0130.08021.07
5.6.110.0070.08320.92
5.6.100.0100.04321.09
5.6.90.0030.04320.91
5.6.80.0170.05320.39
5.6.70.0130.07720.38
5.6.60.0030.05020.41
5.6.50.0000.05020.39
5.6.40.0030.04320.28
5.6.30.0070.04020.30
5.6.20.0200.06720.43
5.6.10.0070.04720.29
5.6.00.0200.07020.40
5.5.380.0170.04020.41
5.5.370.0170.07720.50
5.5.360.0100.04720.39
5.5.350.0030.08320.45
5.5.340.0070.04320.86
5.5.330.0100.08320.80
5.5.320.0030.07320.83
5.5.310.0030.07020.92
5.5.300.0170.07020.91
5.5.290.0030.06320.83
5.5.280.0000.08720.75
5.5.270.0100.08320.75
5.5.260.0070.07720.79
5.5.250.0270.02020.71
5.5.240.0100.07020.18
5.5.230.0230.06320.26
5.5.220.0070.07320.24
5.5.210.0170.07320.24
5.5.200.0130.06720.21
5.5.190.0070.07320.20
5.5.180.0030.08019.98
5.5.160.0100.07720.25
5.5.150.0030.04320.21
5.5.140.0100.03320.17
5.5.130.0000.04320.18
5.5.120.0030.04320.07
5.5.110.0030.04020.25
5.5.100.0030.04020.10
5.5.90.0070.03719.94
5.5.80.0030.03720.06
5.5.70.0070.03720.06
5.5.60.0000.04020.03
5.5.50.0070.02720.03
5.5.40.0000.04719.93
5.5.30.0130.05020.04
5.5.20.0070.06019.95
5.5.10.0000.04320.06
5.5.00.0070.06020.02
5.4.450.0030.07719.31
5.4.440.0070.08019.29
5.4.430.0100.07019.36
5.4.420.0100.05019.42
5.4.410.0030.06719.22
5.4.400.0070.07319.15
5.4.390.0000.05019.02
5.4.380.0030.04018.94
5.4.370.0100.04019.07
5.4.360.0070.06719.19
5.4.350.0100.06719.03
5.4.340.0030.08019.12
5.4.320.0070.04018.95
5.4.310.0100.07019.12
5.4.300.0000.05318.78
5.4.290.0130.03018.78
5.4.280.0030.04318.80
5.4.270.0000.04719.02
5.4.260.0030.04319.05
5.4.250.0030.04018.96
5.4.240.0070.03019.09
5.4.230.0100.03319.02
5.4.220.0170.02718.94
5.4.210.0000.04318.88
5.4.200.0000.03318.97
5.4.190.0030.03718.89
5.4.180.0030.06318.80
5.4.170.0000.04318.94
5.4.160.0030.04018.88
5.4.150.0030.06019.09
5.4.140.0070.03316.39
5.4.130.0030.03716.28
5.4.120.0070.03316.26
5.4.110.0070.03716.48
5.4.100.0000.04016.29
5.4.90.0070.03716.43
5.4.80.0100.05316.29
5.4.70.0070.02716.42
5.4.60.0030.04016.20
5.4.50.0070.03716.24
5.4.40.0100.06316.33
5.4.30.0100.03016.36
5.4.20.0100.03016.39
5.4.10.0130.02716.41
5.4.00.0000.03715.80
5.3.290.0070.07315.58
5.3.280.0000.04015.58
5.3.270.0030.04015.58
5.3.260.0070.03715.58
5.3.250.0070.04015.58
5.3.240.0100.03015.58
5.3.230.0000.04015.58
5.3.220.0100.03015.58
5.3.210.0030.06315.58
5.3.200.0000.04015.58
5.3.190.0070.03715.58
5.3.180.0030.03015.58
5.3.170.0000.04015.58
5.3.160.0100.02315.58
5.3.150.0070.03715.58
5.3.140.0000.03715.58
5.3.130.0000.04015.58
5.3.120.0030.04015.58
5.3.110.0030.04015.58
5.3.100.0030.03715.58
5.3.90.0030.03315.58
5.3.80.0000.04015.58
5.3.70.0000.04015.58
5.3.60.0030.03715.58
5.3.50.0070.03315.58
5.3.40.0030.03715.58
5.3.30.0030.03315.58
5.3.20.0070.03315.58
5.3.10.0030.03315.58
5.3.00.0100.03015.58
5.2.170.0030.03315.58
5.2.160.0070.02315.58
5.2.150.0000.03015.58
5.2.140.0000.03315.58
5.2.130.0000.03315.58
5.2.120.0000.03015.58
5.2.110.0030.03015.58
5.2.100.0030.02715.58
5.2.90.0000.03315.58
5.2.80.0030.03015.58
5.2.70.0000.03015.58
5.2.60.0000.04315.58
5.2.50.0000.03015.58
5.2.40.0030.02715.58
5.2.30.0000.03015.58
5.2.20.0000.03315.58
5.2.10.0000.04715.58
5.2.00.0000.03015.58
5.1.60.0030.02315.58
5.1.50.0000.03015.58
5.1.40.0100.04715.58
5.1.30.0030.02315.58
5.1.20.0030.02715.58
5.1.10.0030.04315.58
5.1.00.0100.03315.58
5.0.50.0000.04715.58
5.0.40.0000.02315.58
5.0.30.0000.03715.58
5.0.20.0070.04715.58
5.0.10.0030.03315.58
5.0.00.0000.06715.58
4.4.90.0070.03015.58
4.4.80.0030.01315.58
4.4.70.0000.01715.58
4.4.60.0000.01715.58
4.4.50.0000.01715.58
4.4.40.0000.02015.58
4.4.30.0030.01315.58
4.4.20.0030.03315.58
4.4.10.0000.03715.58
4.4.00.0030.05315.58
4.3.110.0030.01715.58
4.3.100.0030.03015.58
4.3.90.0000.03715.58
4.3.80.0030.02715.58
4.3.70.0000.03715.58
4.3.60.0030.02015.58
4.3.50.0100.01015.58
4.3.40.0030.04715.58
4.3.30.0000.01715.58
4.3.20.0000.04015.58
4.3.10.0000.03715.58
4.3.00.0030.03315.58

preferences:
37.38 ms | 401 KiB | 5 Q