3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a'=>'first', 'b'=>'second', 'c'=>'third'); foreach ($arr as &$z); // do nothing. maybe? foreach ($arr as $z); // do nothing. maybe? print_r($arr);

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.00318.31
8.3.50.0080.01222.05
8.3.40.0100.00718.57
8.3.30.0070.00718.87
8.3.20.0040.00420.04
8.3.10.0000.00822.09
8.3.00.0090.00020.63
8.2.180.0110.00716.50
8.2.170.0070.01022.96
8.2.160.0100.00319.18
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0050.00319.56
8.2.110.0000.00921.90
8.2.100.0070.00319.32
8.2.90.0000.00819.21
8.2.80.0000.00918.04
8.2.70.0050.00317.63
8.2.60.0050.00217.93
8.2.50.0000.00918.07
8.2.40.0090.00018.22
8.2.30.0000.00718.12
8.2.20.0050.00217.52
8.2.10.0040.00417.80
8.2.00.0080.00017.60
8.1.280.0030.01325.92
8.1.270.0030.00618.68
8.1.260.0020.00526.35
8.1.250.0000.00728.09
8.1.240.0100.00023.82
8.1.230.0040.00719.10
8.1.220.0030.00517.76
8.1.210.0030.00518.77
8.1.200.0060.00317.25
8.1.190.0000.00817.41
8.1.180.0000.00818.73
8.1.170.0070.00018.56
8.1.160.0050.00222.18
8.1.150.0040.00418.58
8.1.140.0000.00717.42
8.1.130.0040.00417.73
8.1.120.0000.00717.43
8.1.110.0000.00817.39
8.1.100.0070.00017.45
8.1.90.0040.00417.45
8.1.80.0000.00717.42
8.1.70.0070.00017.38
8.1.60.0000.01117.54
8.1.50.0070.00017.56
8.1.40.0000.00717.54
8.1.30.0040.00417.63
8.1.20.0050.00217.58
8.1.10.0040.00417.40
8.1.00.0050.00317.44
8.0.300.0040.00418.77
8.0.290.0050.00217.18
8.0.280.0070.00018.35
8.0.270.0040.00417.29
8.0.260.0030.00316.80
8.0.250.0070.00016.98
8.0.240.0000.00916.90
8.0.230.0030.00317.00
8.0.220.0000.00716.85
8.0.210.0030.00316.87
8.0.200.0030.00316.88
8.0.190.0000.00816.96
8.0.180.0030.00316.79
8.0.170.0040.00416.79
8.0.160.0040.00416.91
8.0.150.0070.00016.95
8.0.140.0000.00716.71
8.0.130.0000.00513.26
8.0.120.0040.00416.86
8.0.110.0050.00316.86
8.0.100.0030.00416.73
8.0.90.0000.00716.76
8.0.80.0060.01616.80
8.0.70.0070.00016.78
8.0.60.0050.00216.70
8.0.50.0040.00416.85
8.0.30.0070.01217.27
8.0.20.0080.01117.40
8.0.10.0020.00517.00
8.0.00.0100.01016.74
7.4.330.0000.00515.00
7.4.320.0030.00316.54
7.4.300.0060.00016.39
7.4.290.0000.00816.54
7.4.280.0000.00716.47
7.4.270.0000.00716.35
7.4.260.0000.00716.41
7.4.250.0030.00316.45
7.4.240.0060.00116.56
7.4.230.0000.00716.30
7.4.220.0110.00716.55
7.4.210.0100.00616.53
7.4.200.0000.00716.29
7.4.190.0030.00316.37
7.4.160.0030.01316.23
7.4.150.0150.00817.40
7.4.140.0050.01417.86
7.4.130.0070.01416.58
7.4.120.0100.00616.51
7.4.110.0060.01216.41
7.4.100.0070.01016.36
7.4.90.0090.00916.32
7.4.80.0060.01519.39
7.4.70.0120.00916.43
7.4.60.0070.01016.41
7.4.50.0040.00416.26
7.4.40.0080.00322.77
7.4.30.0060.00916.45
7.4.00.0110.00414.97
7.3.330.0020.00213.18
7.3.320.0000.00512.98
7.3.310.0030.00316.32
7.3.300.0030.00316.29
7.3.290.0120.00816.31
7.3.280.0100.00716.29
7.3.270.0120.00617.40
7.3.260.0070.01116.44
7.3.250.0070.01016.29
7.3.240.0130.01016.40
7.3.230.0130.01016.47
7.3.210.0100.00716.50
7.3.200.0070.01019.39
7.3.190.0070.01116.55
7.3.180.0100.00616.24
7.3.170.0060.00916.28
7.3.160.0090.00616.31
7.3.120.0110.00414.50
7.2.330.0070.01016.64
7.2.320.0110.00816.53
7.2.310.0100.00616.54
7.2.300.0100.00716.61
7.2.290.0090.00916.68
7.2.00.0030.01219.14
7.1.100.0030.01018.07
7.1.70.0000.00717.11
7.1.60.0070.01819.82
7.1.50.0060.01916.87
7.1.00.0000.03722.45
7.0.200.0030.00616.52
7.0.140.0000.07721.97
7.0.60.0030.08719.97
7.0.50.0030.08717.86
7.0.40.0030.05019.95
7.0.30.0500.06020.20
7.0.20.0230.05319.99
7.0.10.0270.07020.09
7.0.00.0030.04020.01
5.6.280.0030.07320.95
5.6.210.0030.04320.57
5.6.200.0130.05018.13
5.6.190.0170.06020.45
5.6.180.0300.07320.27
5.6.170.0300.06320.45
5.6.160.0130.08020.54
5.6.150.0100.07318.14
5.6.140.0000.04018.17
5.6.130.0230.07018.18
5.6.120.0070.07021.00
5.6.110.0070.08721.00
5.6.100.0030.04020.98
5.6.90.0070.07320.96
5.6.80.0170.05320.40
5.6.70.4570.03020.53
5.5.350.0100.08320.46
5.5.340.0170.07017.92
5.5.330.0070.04320.42
5.5.320.0300.07720.21
5.5.310.0400.04720.34
5.5.300.0030.05018.02
5.5.290.0100.07017.92
5.5.280.0030.06320.76
5.5.270.0100.07320.88
5.5.260.0030.09020.76
5.5.250.0100.07320.55
5.5.240.0000.05020.06
5.4.450.0170.05719.13
5.4.440.0270.04719.14
5.4.430.0230.04719.23
5.4.420.0170.05319.15
5.4.410.0370.04719.48
5.4.400.1570.05718.72
5.4.390.0130.06718.64
5.4.380.0200.05718.65
5.4.370.0070.05718.59
5.4.360.0130.05018.57
5.4.350.0200.04718.70
5.4.340.0170.05018.73
5.4.320.0040.03912.45
5.4.310.0070.03612.45
5.4.300.0080.03312.45
5.4.290.0040.04212.45
5.4.280.0070.03412.35
5.4.270.0040.03812.34
5.4.260.0040.04012.34
5.4.250.0100.05018.95
5.4.240.0170.04318.62
5.4.230.0130.05018.77
5.4.220.0100.07318.77
5.4.210.0130.05019.02
5.4.200.0170.06718.72
5.4.190.0130.05018.88
5.4.180.0100.05018.88
5.4.170.0130.04718.98
5.4.160.0130.05018.86
5.4.150.0100.08018.96
5.4.140.0130.05016.44
5.4.130.0130.06016.27
5.4.120.0100.04316.23
5.4.110.0130.04316.50
5.4.100.0100.04316.43
5.4.90.0100.05016.34
5.4.80.0070.05016.51
5.4.70.0000.05316.34
5.4.60.0230.05716.32
5.4.50.0030.05316.38
5.4.40.0230.04016.31
5.4.30.0130.06316.22
5.4.20.0100.06016.17
5.4.10.0230.03716.37
5.4.00.0100.05315.93
5.3.290.0030.04112.80
5.3.280.0070.07314.45
5.3.270.0170.04714.61
5.3.260.0030.06314.45
5.3.250.0100.05014.49
5.3.240.0030.05714.63
5.3.230.0070.05014.37
5.3.220.0030.05314.54
5.3.210.0070.05314.56
5.3.200.0100.04714.57
5.3.190.0030.05714.73
5.3.180.0130.05014.58
5.3.170.0030.05014.71
5.3.160.0070.06014.26
5.3.150.0070.05314.35
5.3.140.0130.06314.60
5.3.130.0100.05314.55
5.3.120.0070.05314.47
5.3.110.0100.05714.25
5.3.100.0100.07713.73
5.3.90.0070.07014.06
5.3.80.0070.05014.11
5.3.70.0130.06713.79
5.3.60.0070.05714.01
5.3.50.0070.07013.94
5.3.40.0130.04313.64
5.3.30.0070.04713.91
5.3.20.0100.04713.70
5.3.10.0100.05713.41
5.3.00.0100.04713.49
5.2.170.0070.05710.97
5.2.160.0070.04011.26
5.2.150.0030.06311.13
5.2.140.0030.06011.15
5.2.130.0070.03711.25
5.2.120.0030.04011.02
5.2.110.0070.05311.09
5.2.100.0070.05711.10
5.2.90.0100.03710.98
5.2.80.0000.04711.11
5.2.70.0100.03711.15
5.2.60.0100.04311.07
5.2.50.0070.04311.03
5.2.40.0030.04011.15
5.2.30.0000.04310.96
5.2.20.0000.04310.95
5.2.10.0070.03710.78
5.2.00.0100.03310.65
5.1.60.0000.03710.05
5.1.50.0070.03310.14
5.1.40.0030.05010.07
5.1.30.0000.04010.09
5.1.20.0030.03710.42
5.1.10.0070.0339.98
5.1.00.0030.03710.00
5.0.50.0030.0308.60
5.0.40.0000.0308.36
5.0.30.0070.0508.24
5.0.20.0070.0238.43
5.0.10.0070.0238.25
5.0.00.0030.0478.39
4.4.90.0000.0237.02
4.4.80.0000.0237.02
4.4.70.0000.0237.02
4.4.60.0030.0207.02
4.4.50.0000.0277.02
4.4.40.0070.0307.02
4.4.30.0030.0207.02
4.4.20.0070.0207.02
4.4.10.0030.0277.02
4.4.00.0100.0277.02
4.3.110.0000.0237.02
4.3.100.0100.0237.02
4.3.90.0000.0237.02
4.3.80.0070.0307.02
4.3.70.0030.0207.02
4.3.60.0070.0277.02
4.3.50.0000.0277.02
4.3.40.0100.0277.02
4.3.30.0100.0137.02
4.3.20.0030.0207.02
4.3.10.0000.0237.02
4.3.00.0100.0236.61

preferences:
39.06 ms | 401 KiB | 5 Q