3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['x', 'y', 'z']; function array_fetch(array $a) { $element = current($a); next($a); echo $a; //var_dump($element); return $element; } $a=array_fetch($array);

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.0120.00618.52
8.3.50.0100.01016.26
8.3.40.0150.00618.58
8.3.30.0000.01518.67
8.3.20.0080.00020.46
8.3.10.0000.00723.72
8.3.00.0030.00522.47
8.2.180.0110.00418.54
8.2.170.0030.01022.96
8.2.160.0080.00822.31
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00920.98
8.2.120.0090.00026.35
8.2.110.0040.00722.16
8.2.100.0040.00717.82
8.2.90.0000.00817.75
8.2.80.0000.00817.97
8.2.70.0030.00618.04
8.2.60.0030.00518.22
8.2.50.0000.00818.10
8.2.40.0020.00520.47
8.2.30.0000.00719.21
8.2.20.0040.00418.06
8.2.10.0020.00519.21
8.2.00.0040.00418.11
8.1.280.0110.00325.92
8.1.270.0020.00520.08
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0040.00423.97
8.1.230.0070.00421.04
8.1.220.0000.00817.76
8.1.210.0080.00018.77
8.1.200.0100.00017.23
8.1.190.0050.00317.10
8.1.180.0050.00318.10
8.1.170.0040.00418.40
8.1.160.0030.00518.81
8.1.150.0060.00318.81
8.1.140.0000.00720.25
8.1.130.0000.00820.16
8.1.120.0000.00717.41
8.1.110.0040.00317.21
8.1.100.0000.00817.37
8.1.90.0000.00717.38
8.1.80.0000.00717.23
8.1.70.0040.00417.42
8.1.60.0040.00417.53
8.1.50.0130.00017.54
8.1.40.0040.00417.39
8.1.30.0040.00417.65
8.1.20.0060.00317.61
8.1.10.0000.00817.55
8.1.00.0000.00817.45
8.0.300.0030.00320.14
8.0.290.0060.00316.75
8.0.280.0030.00618.45
8.0.270.0040.00417.21
8.0.260.0000.00619.93
8.0.250.0000.00616.90
8.0.240.0030.00317.01
8.0.230.0030.00616.95
8.0.220.0030.00316.90
8.0.210.0050.00216.77
8.0.200.0050.00216.93
8.0.190.0000.00816.80
8.0.180.0030.00516.88
8.0.170.0000.00916.89
8.0.160.0070.00016.95
8.0.150.0000.00716.79
8.0.140.0040.00416.76
8.0.130.0030.00313.27
8.0.120.0000.00816.75
8.0.110.0040.00416.88
8.0.100.0030.00516.86
8.0.90.0050.00316.88
8.0.80.0070.01116.90
8.0.70.0000.00716.88
8.0.60.0050.00216.78
8.0.50.0040.00416.80
8.0.30.0110.00817.10
8.0.20.0180.00317.40
8.0.10.0000.00717.07
8.0.00.0100.00816.83
7.4.330.0050.00015.55
7.4.320.0060.00016.48
7.4.300.0030.00316.48
7.4.290.0030.00316.60
7.4.280.0000.00816.58
7.4.270.0030.00316.46
7.4.260.0030.00316.47
7.4.250.0030.00516.54
7.4.240.0030.00316.45
7.4.230.0030.00316.61
7.4.220.0050.00316.43
7.4.210.0070.01216.49
7.4.200.0000.00716.69
7.4.160.0080.00816.52
7.4.140.0100.00717.86
7.4.130.0180.00416.50
7.4.120.0090.00916.54
7.4.110.0130.00316.50
7.4.100.0030.01316.54
7.4.90.0140.00316.52
7.4.80.0080.01519.39
7.4.70.0140.00416.72
7.4.60.0090.00616.34
7.4.50.0060.00916.59
7.4.40.0110.00516.27
7.4.00.0030.01014.88
7.3.330.0030.00313.18
7.3.320.0060.00013.19
7.3.310.0070.00016.36
7.3.300.0040.00416.36
7.3.290.0090.00016.24
7.3.280.0060.00916.40
7.3.260.0080.00916.44
7.3.240.0100.01016.53
7.3.230.0090.00616.55
7.3.210.0070.01016.31
7.3.200.0100.00616.37
7.3.190.0120.00616.48
7.3.180.0100.00716.71
7.3.170.0140.00716.48
7.3.160.0030.01216.35
7.3.30.0060.01614.65
7.3.20.0090.00316.77
7.3.10.0000.01316.39
7.3.00.0080.00416.62
7.2.330.0150.00316.63
7.2.320.0120.00316.70
7.2.310.0060.01016.69
7.2.300.0110.00616.38
7.2.290.0110.01116.67
7.2.160.0090.00514.59
7.2.150.0060.01416.52
7.2.140.0090.01216.82
7.2.130.0040.00716.82
7.2.120.0130.00616.55
7.2.110.0070.00716.66
7.2.100.0040.00716.58
7.2.90.0040.01116.80
7.2.80.0090.00616.64
7.2.70.0070.00716.73
7.2.60.0140.00016.80
7.2.50.0040.01116.42
7.2.40.0090.00616.82
7.2.30.0090.00616.82
7.2.20.0140.00016.67
7.2.10.0090.00616.78
7.2.00.0070.00716.66
7.1.270.0150.00915.77
7.1.260.0110.01115.50
7.1.250.0030.00915.65

preferences:
55.96 ms | 401 KiB | 5 Q