3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myGeneratorFunction($foo) { $bar = yield from factoredComputation1($foo); $baz = yield from factoredComputation2($bar); return $baz; } function factoredComputation1($foo) { yield 1; yield 2; return 'zanzibar'; } function factoredComputation2($bar) { yield 3; yield 4; return 42; } $gen = myGeneratorFunction("Sup"); foreach($gen as $val) { var_dump($val); } var_dump($gen->getReturn());

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.0060.01218.39
8.3.50.0110.00921.09
8.3.40.0110.00718.72
8.3.30.0140.00018.55
8.3.20.0040.00420.34
8.3.10.0000.00821.60
8.3.00.0000.00817.64
8.2.180.0110.00718.54
8.2.170.0100.00322.96
8.2.160.0100.01020.43
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0060.00317.50
8.2.110.0060.00322.13
8.2.100.0060.00619.53
8.2.90.0040.00419.28
8.2.80.0060.00317.97
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0030.00618.07
8.2.40.0000.00819.39
8.2.30.0040.00420.66
8.2.20.0040.00417.67
8.2.10.0030.00518.11
8.2.00.0000.00718.12
8.1.280.0200.00025.92
8.1.270.0030.00524.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.53
8.1.230.0060.00617.48
8.1.220.0000.00717.74
8.1.210.0030.00618.77
8.1.200.0090.00017.48
8.1.190.0040.00417.25
8.1.180.0000.00718.10
8.1.170.0040.00418.59
8.1.160.0000.00722.02
8.1.150.0030.00519.00
8.1.140.0090.00017.57
8.1.130.0000.00717.76
8.1.120.0040.00417.52
8.1.110.0070.00017.49
8.1.100.0040.00417.50
8.1.90.0060.00317.38
8.1.80.0030.00517.45
8.1.70.0000.00717.45
8.1.60.0060.00317.60
8.1.50.0040.00417.55
8.1.40.0050.00317.55
8.1.30.0050.00317.57
8.1.20.0030.00617.61
8.1.10.0050.00317.54
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0080.00016.63
8.0.280.0070.00018.46
8.0.270.0070.00017.25
8.0.260.0070.00017.31
8.0.250.0000.00716.86
8.0.240.0060.00016.93
8.0.230.0030.00517.00
8.0.220.0040.00416.79
8.0.210.0080.00016.93
8.0.200.0030.00316.97
8.0.190.0060.00617.02
8.0.180.0050.00316.88
8.0.170.0040.00416.92
8.0.160.0080.00016.86
8.0.150.0000.00816.88
8.0.140.0030.00516.92
8.0.130.0060.00013.33
8.0.120.0050.00316.86
8.0.110.0000.00716.84
8.0.100.0040.00417.00
8.0.90.0000.00816.94
8.0.80.0080.00716.77
8.0.70.0030.00316.76
8.0.60.0040.00416.86
8.0.50.0000.00716.76
8.0.30.0090.00716.88
8.0.20.0110.00817.40
8.0.10.0000.00716.89
8.0.00.0060.01316.71
7.4.330.0000.00515.08
7.4.320.0040.00416.43
7.4.300.0030.00316.51
7.4.290.0050.00316.63
7.4.280.0000.01016.53
7.4.270.0070.00016.65
7.4.260.0000.00716.49
7.4.250.0050.00316.53
7.4.240.0040.00316.55
7.4.230.0000.00716.40
7.4.220.0040.01716.64
7.4.210.0000.01416.48
7.4.200.0050.00316.63
7.4.160.0090.00616.64
7.4.150.0030.01417.40
7.4.140.0070.01317.86
7.4.130.0100.00716.49
7.4.120.0080.01316.42
7.4.110.0080.00916.80
7.4.100.0090.00916.53
7.4.90.0060.01816.59
7.4.80.0110.01219.39
7.4.70.0100.00716.43
7.4.60.0120.00316.33
7.4.50.0030.00316.30
7.4.40.0100.00716.50
7.4.30.0170.00616.47
7.4.00.0030.01314.68
7.3.330.0080.00013.20
7.3.320.0000.00513.21
7.3.310.0040.00416.18
7.3.300.0030.00316.39
7.3.290.0090.00616.34
7.3.280.0080.01016.35
7.3.270.0100.00717.40
7.3.260.0150.00916.38
7.3.250.0140.00516.42
7.3.240.0070.01016.41
7.3.230.0100.00616.44
7.3.210.0000.01716.36
7.3.200.0150.00316.63
7.3.190.0140.00416.37
7.3.180.0040.01216.54
7.3.170.0110.00616.44
7.3.160.0100.00716.33
7.3.10.0070.00616.48
7.3.00.0020.01416.54
7.2.330.0150.00316.41
7.2.320.0110.00616.81
7.2.310.0000.01616.75
7.2.300.0070.01016.75
7.2.290.0070.01016.83
7.2.130.0090.00616.64
7.2.120.0090.00516.81
7.2.110.0040.01016.66
7.2.100.0060.00716.88
7.2.90.0060.01216.69
7.2.80.0010.01416.92
7.2.70.0090.00716.63
7.2.60.0020.01216.95
7.2.50.0050.00816.93
7.2.40.0070.00616.94
7.2.30.0100.00716.63
7.2.20.0090.00616.88
7.2.10.0110.00516.82
7.2.00.0080.00517.81
7.1.250.0060.00815.62
7.1.200.0110.00715.83
7.1.100.0000.01318.23
7.1.70.0020.00517.23
7.1.60.0060.00619.27
7.1.50.0030.01016.88
7.1.00.0030.07322.44
7.0.200.0000.00716.76
7.0.60.0100.07720.04
7.0.50.0070.04017.86
7.0.40.0000.08720.35
7.0.30.0400.04020.20
7.0.20.0230.04020.33
7.0.10.0130.07320.22
7.0.00.0070.05320.21
5.6.280.0030.05321.07
5.6.210.0130.06720.71
5.6.200.0100.03318.18
5.6.190.0230.07720.57
5.6.180.0170.05320.63
5.6.170.0300.07020.46
5.6.160.0030.05020.71
5.6.150.0070.08018.12
5.6.140.0000.08718.19
5.6.130.0070.04718.18
5.6.120.0070.07321.02
5.6.110.0200.06021.11
5.6.100.0100.08321.11
5.6.90.0130.08021.13
5.6.80.0130.08020.37
5.5.350.0070.08020.47
5.5.340.0000.07317.94
5.5.330.0070.07020.32
5.5.320.0430.07320.53
5.5.310.0230.05720.27
5.5.300.0100.07017.92
5.5.290.0170.06317.92
5.5.280.0130.04720.77
5.5.270.0070.08020.97
5.5.260.0030.06320.86
5.5.250.0030.07320.62
5.5.240.0170.04020.15
5.4.450.0730.05719.46
5.4.440.0970.06019.61
5.4.430.0500.07019.42
5.4.420.0830.05719.58
5.4.410.0470.06719.21
5.4.400.0500.06019.25
5.4.390.0570.06019.13
5.4.380.0830.07719.02
5.4.370.0500.06319.14
5.4.360.0570.05719.14
5.4.350.0630.05019.24
5.4.340.0630.06018.84
5.4.320.0730.05719.13
5.4.310.0600.06019.29
5.4.300.0530.07018.84
5.4.290.0600.06318.87
5.4.280.0570.06018.98
5.4.270.0600.05318.84
5.4.260.0700.04719.25
5.4.250.0700.06018.86
5.4.240.0600.06018.98
5.4.230.0670.05719.13
5.4.220.0630.06019.34
5.4.210.0930.05019.12
5.4.200.0800.04719.34
5.4.190.0700.06718.85
5.4.180.0700.05719.11
5.4.170.0600.05719.25
5.4.160.0630.05719.20
5.4.150.0600.06718.82
5.4.140.0770.05316.46
5.4.130.0900.05316.50
5.4.120.0730.05316.30
5.4.110.0970.07716.62
5.4.100.0800.05016.63
5.4.90.0770.04316.64
5.4.80.0770.04716.44
5.4.70.0030.04716.27
5.4.60.0000.07316.54
5.4.50.0030.05316.52
5.4.40.0170.03716.51
5.4.30.0270.05016.53
5.4.20.0370.06016.43

preferences:
58.17 ms | 401 KiB | 5 Q