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.70.0160.00616.63
8.3.60.0130.00718.07
8.3.50.0120.00822.05
8.3.40.0110.00418.73
8.3.30.0070.00718.83
8.3.20.0070.00020.04
8.3.10.0080.00021.79
8.3.00.0030.00522.52
8.2.180.0090.00916.50
8.2.170.0060.00822.96
8.2.160.0120.00618.70
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0050.00319.89
8.2.110.0040.00422.17
8.2.100.0070.00419.25
8.2.90.0040.00419.08
8.2.80.0040.00917.97
8.2.70.0080.00017.36
8.2.60.0000.00717.93
8.2.50.0030.00518.07
8.2.40.0080.00018.03
8.2.30.0040.00417.95
8.2.20.0040.00417.70
8.2.10.0070.00017.82
8.2.00.0050.00317.73
8.1.280.0150.00625.92
8.1.270.0040.00418.43
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0050.00523.85
8.1.230.0030.00718.95
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0030.00617.51
8.1.180.0030.00618.61
8.1.170.0050.00318.50
8.1.160.0070.00022.13
8.1.150.0000.00718.67
8.1.140.0000.00717.45
8.1.130.0000.00717.80
8.1.120.0000.00817.46
8.1.110.0000.00817.42
8.1.100.0000.00717.33
8.1.90.0000.00717.45
8.1.80.0040.00417.34
8.1.70.0080.00017.47
8.1.60.0060.00317.57
8.1.50.0040.00417.54
8.1.40.0000.00817.38
8.1.30.0040.00417.51
8.1.20.0030.00617.53
8.1.10.0030.00517.35
8.1.00.0050.00317.43
8.0.300.0030.00318.77
8.0.290.0000.00717.29
8.0.280.0030.00318.30
8.0.270.0000.00717.27
8.0.260.0030.00316.85
8.0.250.0000.00716.96
8.0.240.0000.00916.98
8.0.230.0030.00316.89
8.0.220.0030.00316.87
8.0.210.0030.00316.91
8.0.200.0030.00616.93
8.0.190.0000.00916.93
8.0.180.0040.00416.92
8.0.170.0080.00016.95
8.0.160.0040.00416.75
8.0.150.0040.00416.83
8.0.140.0040.00416.89
8.0.130.0000.00613.35
8.0.120.0050.00216.89
8.0.110.0000.00816.90
8.0.100.0070.00016.89
8.0.90.0000.00716.98
8.0.80.0190.00416.83
8.0.70.0040.00416.88
8.0.60.0000.00816.77
8.0.50.0000.00716.93
8.0.30.0110.01117.08
8.0.20.0100.00917.40
8.0.10.0020.00516.93
8.0.00.0140.00416.63
7.4.330.0000.00515.00
7.4.320.0000.00716.38
7.4.300.0040.00416.63
7.4.290.0070.00316.51
7.4.280.0030.00316.53
7.4.270.0070.00016.60
7.4.260.0030.00316.60
7.4.250.0040.00416.37
7.4.240.0020.00616.61
7.4.230.0040.00416.66
7.4.220.0070.01316.66
7.4.210.0090.00916.61
7.4.200.0070.00016.38
7.4.190.0040.00416.39
7.4.160.0070.01316.36
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0080.01116.40
7.4.120.0080.01116.58
7.4.110.0160.00716.57
7.4.100.0160.00616.48
7.4.90.0100.01316.33
7.4.80.0070.01019.39
7.4.70.0100.01316.46
7.4.60.0120.00416.69
7.4.50.0020.00216.39
7.4.40.0060.00922.77
7.4.30.0120.00316.46
7.4.00.0170.00015.15
7.3.330.0020.00213.09
7.3.320.0050.00013.14
7.3.310.0030.00616.39
7.3.300.0030.00416.09
7.3.290.0190.00016.21
7.3.280.0080.00816.29
7.3.270.0070.01017.40
7.3.260.0130.01016.48
7.3.250.0120.00816.40
7.3.240.0070.01716.41
7.3.230.0060.00916.39
7.3.210.0030.01416.65
7.3.200.0060.01019.39
7.3.190.0070.01416.32
7.3.180.0030.01316.21
7.3.170.0070.00716.32
7.3.160.0080.00816.63
7.3.120.0130.00314.68
7.2.330.0030.01316.33
7.2.320.0100.00716.59
7.2.310.0070.01416.30
7.2.300.0030.01416.48
7.2.290.0090.00616.56
7.2.60.0070.00716.73
7.1.200.0140.00015.89
7.1.70.0000.01417.11
7.1.60.0030.02019.82
7.1.50.0100.01316.93
7.1.00.0070.04322.45
7.0.200.0000.00816.78
7.0.140.0030.07722.21
7.0.60.0130.07320.03
7.0.50.0130.08017.66
7.0.40.0030.06020.12
7.0.30.0270.08020.17
7.0.20.0200.08020.30
7.0.10.0100.07020.13
7.0.00.0000.05720.19
5.6.280.0070.07020.78
5.6.210.0130.07720.71
5.6.200.0070.07318.21
5.6.190.0070.05020.49
5.6.180.0230.07020.63
5.6.170.0100.04720.38
5.6.160.0070.04320.71
5.6.150.0100.08018.15
5.6.140.0030.08718.12
5.6.130.0100.08018.06
5.6.120.0170.07720.98
5.6.110.0230.04020.89
5.6.100.0000.08720.99
5.6.90.0100.06021.12
5.6.80.0170.07320.28
5.6.70.3130.04020.27
5.5.350.0100.07320.52
5.5.340.0100.04018.01
5.5.330.0100.07020.25
5.5.320.0230.07720.26
5.5.310.0270.03720.41
5.5.300.0030.09017.95
5.5.290.0130.07317.96
5.5.280.0130.04320.85
5.5.270.0070.04720.76
5.5.260.0170.05720.86
5.5.250.0170.08320.61
5.5.240.0100.07320.26
5.4.450.0100.06019.58
5.4.440.0670.06719.47
5.4.430.1400.07019.14
5.4.420.0630.05719.32
5.4.410.1130.07019.30
5.4.400.1330.04718.76
5.4.390.0870.05718.61
5.4.380.0330.04718.72
5.4.370.0200.04718.74
5.4.360.0100.05718.45
5.4.350.0200.04718.73
5.4.340.0200.05018.71
5.4.320.0050.03912.45
5.4.310.0070.03612.45
5.4.300.0030.03912.45
5.4.290.0060.04012.45
5.4.280.0060.03612.34
5.4.270.0110.03012.34
5.4.260.0070.03612.34
5.4.250.0030.05318.99
5.4.240.0170.05018.94
5.4.230.0070.05318.75
5.4.220.0030.05318.69
5.4.210.0030.05318.86
5.4.200.0130.05018.92
5.4.190.0100.04718.88
5.4.180.0070.05318.87
5.4.170.0100.05019.02
5.4.160.0100.04718.97
5.4.150.0030.06018.75
5.4.140.0030.05316.48
5.4.130.0130.05316.25
5.4.120.0030.05316.48
5.4.110.0000.06316.42
5.4.100.0100.04716.20
5.4.90.0070.04716.48
5.4.80.0100.04316.48
5.4.70.0030.05316.33
5.4.60.0070.05016.37
5.4.50.0130.04316.33
5.4.40.0130.06016.45
5.4.30.0130.04716.37
5.4.20.0100.05016.25
5.4.10.0070.05016.25
5.4.00.0070.04715.83
5.3.290.0060.04312.80
5.3.280.0070.04714.29
5.3.270.0100.05014.38
5.3.260.0030.05314.61
5.3.250.0100.04714.64
5.3.240.0030.05314.76
5.3.230.0070.04714.29
5.3.220.0130.05714.56
5.3.210.0000.05714.40
5.3.200.0100.04714.58
5.3.190.0070.05314.43
5.3.180.0100.06014.41
5.3.170.0130.04314.58
5.3.160.0100.07014.57
5.3.150.0100.04714.58
5.3.140.0030.05314.33
5.3.130.0030.06014.61
5.3.120.0130.07314.32
5.3.110.0100.05014.59
5.3.100.0100.04713.80
5.3.90.0030.07014.02
5.3.80.0100.06314.02
5.3.70.0030.05313.87
5.3.60.0100.06314.00
5.3.50.0070.05713.86
5.3.40.0070.05013.98
5.3.30.0100.04313.68
5.3.20.0130.04313.60
5.3.10.0000.05313.53
5.3.00.0070.05013.50
5.2.170.0070.04011.04
5.2.160.0070.04311.02
5.2.150.0070.03711.05
5.2.140.0070.06010.98
5.2.130.0070.04011.21
5.2.120.0130.03311.03
5.2.110.0030.04011.09
5.2.100.0070.03711.19
5.2.90.0030.04010.86
5.2.80.0100.03711.11
5.2.70.0070.04011.01
5.2.60.0100.04011.05
5.2.50.0000.05011.01
5.2.40.0070.04310.93
5.2.30.0070.04711.01
5.2.20.0000.05010.88
5.2.10.0030.04710.92
5.2.00.0030.05010.70
5.1.60.0030.0379.93
5.1.50.0100.0339.93
5.1.40.0030.03710.12
5.1.30.0070.03310.41
5.1.20.0000.06010.28
5.1.10.0000.04010.13
5.1.00.0030.04310.02
5.0.50.0000.0338.48
5.0.40.0030.0338.45
5.0.30.0070.0438.31
5.0.20.0070.0338.14
5.0.10.0000.0308.00
5.0.00.0030.0408.07
4.4.90.0130.0137.24
4.4.80.0070.0277.24
4.4.70.0030.0207.24
4.4.60.0000.0237.24
4.4.50.0030.0207.24
4.4.40.0100.0237.24
4.4.30.0030.0307.24
4.4.20.0030.0207.24
4.4.10.0030.0237.24
4.4.00.0070.0407.24
4.3.110.0030.0277.24
4.3.100.0070.0277.24
4.3.90.0070.0177.24
4.3.80.0030.0307.24
4.3.70.0000.0237.24
4.3.60.0000.0337.24
4.3.50.0070.0237.24
4.3.40.0000.0377.24
4.3.30.0000.0237.24
4.3.20.0000.0237.24
4.3.10.0000.0237.24
4.3.00.0000.0236.61

preferences:
57.48 ms | 401 KiB | 5 Q