3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen(): Generator { yield new stdClass() => 'foo'; yield ['a'] => 'foo'; } gen(); foreach(gen() as $key => $value) { var_dump($key, $value); }

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.0180.00016.63
8.3.50.0110.00418.20
8.3.40.0090.00618.43
8.3.30.0070.01518.42
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.180.0150.00625.92
8.2.170.0090.00618.70
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0000.00919.14
8.2.100.0130.00017.72
8.2.90.0030.00619.08
8.2.80.0050.00317.97
8.2.70.0040.00417.38
8.2.60.0000.00817.50
8.2.50.0040.00418.05
8.2.40.0000.00718.15
8.2.30.0040.00417.96
8.2.20.0000.00717.96
8.2.10.0040.00419.24
8.2.00.0050.00319.22
8.1.280.0040.01125.92
8.1.270.0000.00824.02
8.1.260.0000.00828.09
8.1.250.0000.00728.09
8.1.240.0060.00323.97
8.1.230.0100.00319.42
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0030.00517.38
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0090.00018.69
8.1.160.0040.00418.88
8.1.150.0070.00018.84
8.1.140.0040.00418.94
8.1.130.0030.00320.05
8.1.120.0030.00317.39
8.1.110.0030.00317.51
8.1.100.0030.00317.44
8.1.90.0040.00417.32
8.1.80.0000.00717.34
8.1.70.0070.00017.44
8.1.60.0000.00817.60
8.1.50.0000.00917.45
8.1.40.0040.00417.47
8.1.30.0040.00417.59
8.1.20.0090.00017.55
8.1.10.0060.00317.59
8.1.00.0040.00417.33
8.0.300.0040.00418.77
8.0.290.0000.00916.58
8.0.280.0000.00718.35
8.0.270.0030.00317.99
8.0.260.0030.00318.43
8.0.250.0040.00416.94
8.0.240.0060.00016.95
8.0.230.0070.00016.91
8.0.220.0000.00616.79
8.0.210.0030.00316.89
8.0.200.0030.00316.91
8.0.190.0030.00316.86
8.0.180.0040.00416.82
8.0.170.0030.00516.81
8.0.160.0040.00416.89
8.0.150.0000.00716.89
8.0.140.0060.00316.83
8.0.130.0030.00313.36
8.0.120.0050.00316.80
8.0.110.0040.00416.82
8.0.100.0070.00016.83
8.0.90.0080.00016.86
8.0.80.0070.00916.84
8.0.70.0000.00716.91
8.0.60.0040.00416.85
8.0.50.0000.00816.84
8.0.30.0060.00916.83
8.0.20.0040.01116.89
8.0.10.0080.01217.00
8.0.00.0110.01117.05
7.4.330.0050.00015.55
7.4.320.0030.00316.59
7.4.300.0030.00316.51
7.4.290.0040.00416.59
7.4.280.0070.00016.52
7.4.270.0000.00716.52
7.4.260.0060.00013.38
7.4.250.0030.00316.52
7.4.240.0060.00316.63
7.4.230.0000.00716.53
7.4.220.0040.00316.65
7.4.210.0060.01416.49
7.4.200.0030.00316.70
7.4.160.0050.00816.73
7.4.150.0030.01616.54
7.4.140.0040.01016.42
7.4.130.0030.01816.54
7.4.120.0080.00816.48
7.4.110.0060.00916.48
7.4.100.0140.00716.46
7.4.90.0130.00716.41
7.4.80.0140.00716.55
7.4.70.0110.00516.49
7.4.60.0120.00316.48
7.4.50.0040.01116.55
7.4.40.0060.00916.29
7.4.30.0130.00316.48
7.4.20.0120.00616.51
7.4.10.0070.01016.34
7.4.00.0030.01016.36
7.3.330.0040.00416.08
7.3.320.0050.00313.23
7.3.310.0040.00416.32
7.3.300.0000.00616.09
7.3.290.0070.00916.30
7.3.270.0090.00916.22
7.3.260.0090.00616.23
7.3.250.0040.01116.25
7.3.240.0090.00616.19
7.3.230.0040.01116.26
7.3.220.0090.01216.16
7.3.210.0100.01016.22
7.3.200.0170.00316.24
7.3.190.0050.01016.27
7.3.180.0100.00616.19
7.3.170.0060.00916.19
7.3.160.0060.01316.15
7.3.150.0060.01316.20
7.3.140.0130.00316.17
7.3.130.0000.01416.35
7.3.120.0030.01216.23
7.3.110.0070.00716.05
7.3.100.0060.00916.07
7.3.90.0080.01216.38
7.3.80.0090.00616.18
7.3.70.0000.01816.26
7.3.60.0030.01216.41
7.3.50.0120.00616.31
7.3.40.0100.00616.34
7.3.30.0060.01316.38
7.3.20.0140.00516.42
7.3.10.0090.00916.26
7.3.00.0340.01016.36

preferences:
34.31 ms | 400 KiB | 5 Q