3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements Iterator { public function current(): Foo { return $this; } public function key(): Foo { return $this; } public function next(): void {} public function rewind(): void {} public function valid(): bool { return true; } } foreach ( new Foo as $key => $value ) { var_dump($key, $value); break; }

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.120.0120.00920.45
8.4.110.0160.00418.66
8.4.100.0140.00618.79
8.4.90.0050.00420.60
8.4.80.0050.00318.91
8.4.70.0100.01118.87
8.4.60.0100.01118.75
8.4.50.0130.00717.78
8.4.40.0040.00417.98
8.4.30.0120.00418.81
8.4.20.0120.00819.70
8.4.10.0080.00019.49
8.3.250.0100.00916.91
8.3.240.0100.00916.68
8.3.230.0060.00216.36
8.3.220.0110.00218.96
8.3.210.0090.00618.55
8.3.200.0050.00316.51
8.3.190.0070.00817.02
8.3.180.0090.01016.63
8.3.170.0070.00018.76
8.3.160.0150.00316.84
8.3.150.0090.00918.85
8.3.140.0090.00916.77
8.3.130.0040.00418.42
8.3.120.0080.00818.85
8.3.110.0070.00320.94
8.3.100.0060.00316.53
8.3.90.0040.00426.77
8.3.80.0070.00319.36
8.3.70.0070.01418.31
8.3.60.0110.00716.75
8.3.50.0110.00623.59
8.3.40.0070.00718.71
8.3.30.0050.00818.43
8.3.20.0080.00020.75
8.3.10.0000.00822.05
8.3.00.0090.00022.46
8.2.290.0120.00420.28
8.2.280.0120.00818.61
8.2.270.0070.01116.76
8.2.260.0090.00918.84
8.2.250.0070.01116.64
8.2.240.0030.00519.11
8.2.230.0080.00422.58
8.2.220.0030.00624.06
8.2.210.0110.00726.77
8.2.200.0060.00318.88
8.2.190.0170.00318.30
8.2.180.0110.00418.29
8.2.170.0110.00422.96
8.2.160.0090.00922.14
8.2.150.0070.00324.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00926.16
8.2.110.0000.00822.02
8.2.100.0080.00417.74
8.2.90.0000.00817.75
8.2.80.0030.00618.77
8.2.70.0080.00018.05
8.2.60.0040.00418.28
8.2.50.0050.00219.39
8.2.40.0000.00821.06
8.2.30.0040.00419.31
8.2.20.0000.00717.96
8.2.10.0080.00019.20
8.2.00.0000.00719.25
8.1.330.0160.00417.90
8.1.320.0120.00816.13
8.1.310.0060.00316.70
8.1.300.0030.00616.13
8.1.290.0070.00330.84
8.1.280.0120.00625.92
8.1.270.0080.00021.76
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0100.00021.96
8.1.230.0110.00020.91
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.36
8.1.190.0040.00417.22
8.1.180.0070.00318.98
8.1.170.0080.00018.51
8.1.160.0030.00519.01
8.1.150.0030.00318.77
8.1.140.0040.00418.89
8.1.130.0000.00720.20
8.1.120.0070.00017.42
8.1.110.0050.00317.34
8.1.100.0040.00417.38
8.1.90.0040.00417.34
8.1.80.0040.00417.45
8.1.70.0000.00717.48
8.1.60.0060.00317.47
8.1.50.0000.00817.52
8.1.40.0000.00817.50
8.1.30.0000.00817.61
8.1.20.0060.00317.54
8.1.10.0040.00417.55
8.1.00.0090.00017.50
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0040.00418.43
8.0.270.0030.00316.69
8.0.260.0050.00220.06
8.0.250.0030.00316.96
8.0.240.0030.00316.96
8.0.230.0000.00616.88
8.0.220.0030.00316.89
8.0.210.0030.00316.79
8.0.200.0080.00016.84
8.0.190.0040.00416.82
8.0.180.0070.00316.93
8.0.170.0040.00416.96
8.0.160.0070.00016.90
8.0.150.0050.00316.86
8.0.140.0040.00316.89
8.0.130.0000.00613.33
8.0.120.0000.00816.87
8.0.110.0000.00716.88
8.0.100.0040.00416.77
8.0.90.0040.00416.84
8.0.80.0060.01316.81
8.0.70.0040.00416.71
8.0.60.0020.00516.93
8.0.50.0000.00716.75
8.0.30.0070.01017.01
8.0.20.0120.00617.15
8.0.10.0000.00717.02
8.0.00.0110.00717.01
7.4.330.0000.00515.55
7.4.320.0000.00616.61
7.4.300.0030.00316.62
7.4.290.0030.00316.47
7.4.280.0050.00316.61
7.4.270.0040.00416.51
7.4.260.0000.00513.32
7.4.250.0030.00316.38
7.4.240.0040.00416.49
7.4.230.0030.00316.65
7.4.220.0030.00316.42
7.4.210.0090.01016.49
7.4.200.0000.00716.50
7.4.130.0100.00916.58
7.4.120.0040.01516.65
7.4.110.0080.00816.44
7.4.100.0060.01116.62
7.4.90.0070.01116.46
7.4.80.0130.01019.39
7.4.70.0030.01316.44
7.4.60.0070.01016.40
7.4.50.0070.00616.54
7.4.40.0030.01416.64
7.4.30.0150.00316.45
7.4.20.0100.00616.35
7.4.10.0110.00616.46
7.4.00.0140.00316.64
7.3.330.0000.00616.34
7.3.320.0000.00513.22
7.3.310.0070.00016.35
7.3.300.0050.00316.25
7.3.290.0050.01216.24
7.3.260.0070.01516.34
7.3.240.0070.01116.41
7.3.230.0060.01616.63
7.3.210.0070.01016.42
7.3.200.0110.00616.48
7.3.190.0130.00316.48
7.3.180.0120.00316.60
7.3.170.0100.01116.26
7.3.160.0060.00916.51
7.3.150.0100.00716.30
7.3.140.0100.01316.40
7.3.130.0090.00916.30
7.3.120.0140.00316.55
7.3.110.0060.01216.34
7.3.100.0130.00316.43
7.3.90.0030.01316.43
7.3.80.0040.01116.28
7.3.70.0030.01016.34
7.3.60.0160.00616.33
7.3.50.0000.01516.25
7.3.40.0090.00616.21
7.3.30.0030.01816.29
7.3.20.0080.00816.41
7.3.10.0120.00416.27
7.3.00.0050.01216.23
7.2.330.0100.01016.80
7.2.320.0110.00616.31
7.2.310.0040.01216.62
7.2.300.0110.00716.51
7.2.290.0040.01216.38
7.2.280.0090.00916.58
7.2.270.0120.00616.38
7.2.260.0100.00616.46
7.2.250.0090.00916.60
7.2.240.0080.00816.62
7.2.230.0070.01016.65
7.2.220.0060.01016.47
7.2.210.0090.00716.58
7.2.200.0070.00716.50
7.2.190.0170.00516.57
7.2.180.0080.00816.39
7.2.170.0090.01116.53
7.2.160.0030.01916.38
7.2.150.0060.01216.58
7.2.140.0070.01316.54
7.2.130.0100.01416.54
7.2.120.0160.00016.56
7.2.110.0190.00016.51
7.2.100.0130.00316.61
7.2.90.0040.01416.56
7.2.80.0120.00416.76
7.2.70.0090.00616.52
7.2.60.0110.00416.61
7.2.50.0030.01216.55
7.2.40.0030.01316.57
7.2.30.0030.01216.64
7.2.20.0100.00516.73
7.2.10.0100.00616.52
7.2.00.0060.01216.79

preferences:
126.38 ms | 403 KiB | 5 Q