3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen1() { yield 1; yield 2; yield 3; } function gen2(bool $opt) { if ($opt) return yield from gen1(); yield 4; yield 5; yield 6; } print_r(iterator_to_array(gen2(true))); print_r(iterator_to_array(gen2(false)));

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.0110.00416.25
8.3.50.0090.00916.29
8.3.40.0150.00318.76
8.3.30.0110.00418.54
8.3.20.0080.00020.35
8.3.10.0080.00021.66
8.3.00.0080.00017.59
8.2.180.0100.00316.32
8.2.170.0150.00022.96
8.2.160.0070.00720.31
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00019.31
8.2.120.0070.00026.35
8.2.110.0060.00319.20
8.2.100.0090.00319.51
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0070.00417.38
8.2.60.0030.00617.80
8.2.50.0060.00318.10
8.2.40.0050.00322.34
8.2.30.0070.00020.95
8.2.20.0030.00517.97
8.2.10.0000.00718.04
8.2.00.0050.00317.98
8.1.280.0120.00625.92
8.1.270.0050.00222.19
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00722.14
8.1.230.0040.00720.88
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0050.00218.10
8.1.170.0040.00418.66
8.1.160.0060.00318.89
8.1.150.0000.00718.74
8.1.140.0040.00419.42
8.1.130.0000.00718.82
8.1.120.0040.00417.42
8.1.110.0000.00717.25
8.1.100.0050.00217.39
8.1.90.0000.00917.29
8.1.80.0040.00417.41
8.1.70.0040.00417.46
8.1.60.0000.00817.41
8.1.50.0000.00817.37
8.1.40.0040.00417.49
8.1.30.0000.00717.54
8.1.20.0030.00817.48
8.1.10.0040.00417.37
8.1.00.0070.00017.37
8.0.300.0040.00818.77
8.0.290.0060.00316.63
8.0.280.0030.00318.43
8.0.270.0050.00217.13
8.0.260.0000.00616.76
8.0.250.0040.00416.82
8.0.240.0000.00716.84
8.0.230.0030.00416.88
8.0.220.0070.00016.89
8.0.210.0000.00716.76
8.0.200.0000.00816.74
8.0.190.0050.00316.89
8.0.180.0070.00016.84
8.0.170.0030.00516.86
8.0.160.0030.00316.88
8.0.150.0030.00616.83
8.0.140.0000.00816.75
8.0.130.0050.00013.28
8.0.120.0000.00716.80
8.0.110.0050.00216.86
8.0.100.0040.00416.78
8.0.90.0000.00716.87
8.0.80.0110.01116.73
8.0.70.0000.00816.77
8.0.60.0040.00416.61
8.0.50.0000.00716.69
8.0.30.0100.00616.78
8.0.20.0090.00917.40
8.0.10.0000.00716.92
8.0.00.0120.00616.74
7.4.330.0000.00515.55
7.4.320.0000.00716.65
7.4.300.0030.00316.61
7.4.290.0030.00316.50
7.4.280.0050.00316.43
7.4.270.0030.00316.65
7.4.260.0000.00613.29
7.4.250.0030.00316.57
7.4.240.0070.00016.49
7.4.230.0070.00016.67
7.4.220.0170.01016.54
7.4.210.0100.00716.66
7.4.200.0000.00716.61
7.4.160.0060.01116.36
7.4.150.0100.00717.40
7.4.140.0080.01217.86
7.4.130.0100.00816.45
7.4.120.0060.01616.52
7.4.110.0100.00716.69
7.4.100.0130.00816.52
7.4.90.0090.00916.46
7.4.80.0140.00619.39
7.4.70.0120.00316.37
7.4.60.0090.00616.46
7.4.50.0040.01116.54
7.4.40.0040.01416.67
7.4.30.0130.01016.42
7.4.00.0030.01415.11
7.3.330.0040.00313.22
7.3.320.0000.00513.19
7.3.310.0000.00716.32
7.3.300.0030.00316.25
7.3.290.0030.00316.16
7.3.280.0100.00816.20
7.3.270.0130.00617.40
7.3.260.0080.00916.38
7.3.250.0090.01016.25
7.3.240.0050.01216.45
7.3.230.0060.01216.46
7.3.210.0100.00716.66
7.3.200.0030.01516.32
7.3.190.0140.00716.43
7.3.180.0040.01216.37
7.3.170.0090.00616.24
7.3.160.0140.00716.32
7.3.10.0110.00816.32
7.3.00.0060.00616.48
7.2.330.0100.00716.39
7.2.320.0090.01216.73
7.2.310.0110.01116.62
7.2.300.0140.01016.61
7.2.290.0120.01216.56
7.2.130.0060.00616.32
7.2.120.0030.01016.18
7.2.110.0110.00016.57
7.2.100.0060.00616.30
7.2.90.0780.00615.57
7.2.80.0060.01015.53
7.2.70.0810.00715.61
7.2.60.0660.00515.69
7.2.50.0120.00815.46
7.2.40.0080.01015.81
7.2.30.0230.00915.86
7.2.20.0050.01215.57
7.2.10.0100.00815.62
7.2.00.1240.00615.81
7.1.250.0060.00615.61
7.1.210.2340.01313.52
7.1.200.0590.01013.90
7.1.190.0190.00313.67
7.1.180.0070.00713.78
7.1.170.0130.00513.89
7.1.160.0090.00913.68
7.1.150.0120.00413.81
7.1.140.0540.00613.83
7.1.130.0080.01113.73
7.1.120.0770.01114.06
7.1.110.0150.00413.84
7.1.100.2360.00713.68
7.1.90.0440.01013.71
7.1.80.0070.01413.60
7.1.70.2490.00313.82
7.1.60.0320.01531.86
7.1.50.0860.01431.71
7.1.40.0930.00731.65
7.1.30.1410.01031.50
7.1.20.0380.01031.79
7.1.10.0070.01413.65
7.1.00.0090.00913.91
7.0.310.0120.00013.55
7.0.300.0110.00513.43
7.0.290.0470.00613.54
7.0.280.0030.01213.46
7.0.270.0060.01113.41
7.0.260.0110.01113.45
7.0.250.0140.00313.70
7.0.240.0730.00813.68
7.0.230.0470.00413.66
7.0.220.0220.00313.40
7.0.210.0130.00413.33
7.0.200.0040.01113.51
7.0.190.2280.00313.45
7.0.180.0080.01313.45
7.0.170.0250.00613.64
7.0.160.2180.00313.45
7.0.150.2390.01013.63
7.0.140.0640.00313.63
7.0.130.0140.00513.64
7.0.120.2770.00713.32
7.0.110.1050.00613.54
7.0.100.2370.00613.50
7.0.90.2420.01013.45
7.0.80.3880.00713.37
7.0.70.1410.01013.55
7.0.60.0140.00413.57
7.0.50.1220.00313.64
7.0.40.0570.00313.48
7.0.30.0180.00313.72
7.0.20.3130.00313.64
7.0.10.3650.00313.60
7.0.00.0960.00313.63

preferences:
48.01 ms | 401 KiB | 5 Q