3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { if (1 < 0) { yield 'a'; } } function test2() { yield 'a'; yield 'b'; } $test = test(); $test2 = test2(); var_dump($test->valid(), $test2->valid()); // echo 'Iterate test', PHP_EOL; // foreach ($test as $a) { // echo $a, PHP_EOL; // } echo 'Iterate test2', PHP_EOL; foreach ($test2 as $a) { echo $a, PHP_EOL; }

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.40.0120.00318.72
8.3.30.0140.00018.68
8.3.20.0040.00419.98
8.3.10.0070.00021.73
8.3.00.0040.00419.53
8.2.170.0140.00722.96
8.2.160.0060.00920.26
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00020.51
8.2.120.0060.00326.35
8.2.110.0060.00319.24
8.2.100.0080.00318.03
8.2.90.0000.00819.17
8.2.80.0000.00917.97
8.2.70.0080.00317.50
8.2.60.0040.00417.93
8.2.50.0050.00518.10
8.2.40.0000.00720.32
8.2.30.0080.00019.32
8.2.20.0030.00617.97
8.2.10.0040.00418.11
8.2.00.0000.00718.06
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00622.05
8.1.230.0060.00617.42
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.38
8.1.190.0080.00017.23
8.1.180.0000.00718.10
8.1.170.0030.00518.43
8.1.160.0030.00618.88
8.1.150.0000.00718.88
8.1.140.0000.00719.58
8.1.130.0000.00718.88
8.1.120.0030.00417.33
8.1.110.0040.00417.38
8.1.100.0060.00317.47
8.1.90.0040.00417.46
8.1.80.0070.00317.53
8.1.70.0040.00417.43
8.1.60.0000.00817.58
8.1.50.0040.00417.53
8.1.40.0030.00617.50
8.1.30.0040.00817.66
8.1.20.0000.00817.60
8.1.10.0000.00817.54
8.1.00.0070.00017.49
8.0.300.0000.00918.77
8.0.290.0050.00316.88
8.0.280.0000.00718.50
8.0.270.0030.00317.19
8.0.260.0030.00316.76
8.0.250.0040.00417.04
8.0.240.0050.00217.04
8.0.230.0030.00316.95
8.0.220.0000.00716.93
8.0.210.0070.00016.79
8.0.200.0030.00316.97
8.0.190.0060.00316.91
8.0.180.0040.00416.93
8.0.170.0000.00716.97
8.0.160.0030.00317.00
8.0.150.0000.00916.78
8.0.140.0040.00416.93
8.0.130.0000.00513.39
8.0.120.0020.00516.87
8.0.110.0050.00216.88
8.0.100.0070.00017.00
8.0.90.0040.00416.94
8.0.80.0140.00316.95
8.0.70.0050.00216.80
8.0.60.0040.00416.91
8.0.50.0040.00416.80
8.0.30.0080.01117.11
8.0.20.0090.01017.40
8.0.10.0040.00416.95
8.0.00.0090.00916.81
7.4.330.0050.00015.55
7.4.320.0040.00416.51
7.4.300.0030.00316.65
7.4.290.0000.00716.60
7.4.280.0040.00316.55
7.4.270.0040.00416.50
7.4.260.0040.00416.57
7.4.250.0030.00616.58
7.4.240.0000.00716.60
7.4.230.0050.00216.67
7.4.220.0120.01316.46
7.4.210.0100.00416.60
7.4.200.0030.00316.40
7.4.160.0080.00816.53
7.4.150.0150.00317.40
7.4.140.0100.00917.86
7.4.130.0150.00916.49
7.4.120.0100.00916.53
7.4.110.0130.00416.51
7.4.100.0110.00716.55
7.4.90.0120.00616.47
7.4.80.0060.01519.39
7.4.70.0060.00916.47
7.4.60.0100.00716.68
7.4.50.0090.00616.33
7.4.40.0090.01516.56
7.4.30.0170.00716.54
7.4.00.0080.00814.80
7.3.330.0000.00513.09
7.3.320.0050.00013.34
7.3.310.0070.00016.18
7.3.300.0030.00316.33
7.3.290.0000.00716.41
7.3.280.0070.01116.37
7.3.270.0090.00917.40
7.3.260.0090.00816.45
7.3.250.0100.01116.49
7.3.240.0080.00916.44
7.3.230.0170.00716.53
7.3.210.0060.00916.23
7.3.200.0120.00316.48
7.3.190.0000.01816.44
7.3.180.0100.00516.48
7.3.170.0060.00916.50
7.3.160.0060.01016.61
7.3.120.0100.00714.70
7.3.110.0030.01114.92
7.3.100.0070.00914.82
7.3.90.0080.00514.88
7.3.80.0030.00814.66
7.3.70.0090.00514.91
7.3.60.0020.01014.97
7.3.50.0110.00414.83
7.3.40.0110.00314.88
7.3.30.0090.00414.85
7.3.20.0050.00916.51
7.3.10.0090.00516.68
7.3.00.0060.00916.63
7.2.330.0130.00416.74
7.2.320.0100.00716.68
7.2.310.0130.00316.50
7.2.300.0070.01416.42
7.2.290.0100.01316.77
7.2.250.0030.01414.98
7.2.240.0070.01015.29
7.2.230.0050.01014.94
7.2.220.0050.00714.99
7.2.210.0060.00615.13
7.2.200.0050.00715.04
7.2.190.0060.00815.13
7.2.180.0020.01215.06
7.2.170.0080.00514.93
7.2.160.0000.01515.09
7.2.150.0030.01217.01
7.2.140.0070.00716.63
7.2.130.0090.00316.79
7.2.120.0000.01817.00
7.2.110.0070.00717.07
7.2.100.0040.00716.93
7.2.90.0040.01117.17
7.2.80.0130.00016.91
7.2.70.0100.00717.10
7.2.60.0120.00316.88
7.2.50.0090.00616.92
7.2.40.0160.00017.04
7.2.30.0000.01216.79
7.2.20.0100.00716.97
7.2.10.0060.01216.78
7.2.00.0080.00618.13
7.1.330.0090.00615.66
7.1.320.0070.00415.68
7.1.310.0000.01415.68
7.1.300.0040.00915.84
7.1.290.0050.01015.72
7.1.280.0060.00515.77
7.1.270.0020.01215.76
7.1.260.0020.01115.74
7.1.250.0030.00915.79
7.1.200.0090.00615.71
7.1.100.0210.00617.86
7.1.70.0030.01317.13
7.1.60.0220.01535.05
7.1.50.0190.01734.81
7.1.40.0180.01934.35
7.1.30.0240.01434.34
7.1.20.0130.01734.38
7.1.10.0060.01016.30
7.1.00.0050.01516.82
7.0.200.0090.00916.46
7.0.190.0060.01116.86
7.0.180.0050.01116.30
7.0.170.0000.02116.45
7.0.160.0050.00916.18
7.0.150.0050.01216.14
7.0.140.0090.00716.20
7.0.130.0070.01216.37
7.0.120.0050.01316.45
7.0.110.0060.01016.33
7.0.100.0100.00716.31
7.0.90.0050.01316.16
7.0.80.0090.00616.21
7.0.70.0060.01016.17
7.0.60.0090.00715.86
7.0.50.0060.01216.20
7.0.40.0050.01416.45
7.0.30.0030.01416.34
7.0.20.0080.01416.52
7.0.10.0110.00816.29
7.0.00.0000.01816.26

preferences:
45.21 ms | 400 KiB | 5 Q