3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myGeneratorFunction($foo) { // ... do some stuff with $foo ... $bar = yield from factoredComputation1($foo); // ... do some stuff with $bar ... $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; }

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.08
8.3.50.0100.01016.07
8.3.40.0120.00618.71
8.3.30.0080.00818.45
8.3.20.0030.00620.20
8.3.10.0040.00421.65
8.3.00.0040.00417.79
8.2.180.0150.00716.32
8.2.170.0120.00622.96
8.2.160.0160.00620.35
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0090.00017.25
8.2.110.0060.00321.11
8.2.100.0080.00319.54
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0050.00317.50
8.2.60.0000.00817.90
8.2.50.0000.00918.07
8.2.40.0000.00719.40
8.2.30.0000.00720.72
8.2.20.0040.00417.61
8.2.10.0040.00417.80
8.2.00.0040.00417.98
8.1.280.0080.00625.92
8.1.270.0060.00321.79
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.00922.52
8.1.230.0110.00017.42
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0000.00818.48
8.1.160.0070.00021.92
8.1.150.0000.00818.70
8.1.140.0000.00817.28
8.1.130.0000.00717.56
8.1.120.0030.00317.20
8.1.110.0000.00817.34
8.1.100.0000.00717.36
8.1.90.0030.00617.23
8.1.80.0030.00317.35
8.1.70.0040.00417.35
8.1.60.0020.00517.44
8.1.50.0040.00417.38
8.1.40.0040.00417.33
8.1.30.0000.00817.56
8.1.20.0050.00517.51
8.1.10.0040.00417.31
8.1.00.0040.00417.20
8.0.300.0030.00518.77
8.0.290.0070.00016.58
8.0.280.0030.00318.31
8.0.270.0000.00717.16
8.0.260.0070.00017.03
8.0.250.0020.00516.80
8.0.240.0060.00016.79
8.0.230.0000.00716.73
8.0.220.0000.00616.70
8.0.210.0030.00316.78
8.0.200.0040.00416.84
8.0.190.0000.01016.82
8.0.180.0030.00516.75
8.0.170.0050.00516.66
8.0.160.0030.00416.76
8.0.150.0070.00016.77
8.0.140.0040.00416.66
8.0.130.0060.00013.25
8.0.120.0040.00416.78
8.0.110.0040.00416.74
8.0.100.0040.00416.81
8.0.90.0000.00716.71
8.0.80.0100.00516.73
8.0.70.0000.00716.72
8.0.60.0050.00216.77
8.0.50.0000.00716.77
8.0.30.0130.00317.10
8.0.20.0110.00917.40
8.0.10.0000.00716.75
8.0.00.0090.00816.68
7.4.330.0000.00515.08
7.4.320.0000.00616.37
7.4.300.0000.00616.36
7.4.290.0030.00316.42
7.4.280.0000.00916.48
7.4.270.0030.00316.37
7.4.260.0040.00416.44
7.4.250.0000.00816.38
7.4.240.0070.00016.37
7.4.230.0030.00316.45
7.4.220.0030.01816.49
7.4.210.0070.00716.52
7.4.200.0030.00316.37
7.4.160.0090.00616.56
7.4.150.0030.01917.40
7.4.140.0060.01217.86
7.4.130.0080.00916.45
7.4.120.0070.01116.28
7.4.110.0070.01016.31
7.4.100.0090.00916.24
7.4.90.0130.00816.32
7.4.80.0110.00719.39
7.4.70.0140.00316.44
7.4.60.0090.00616.22
7.4.50.0050.00016.19
7.4.40.0120.00616.31
7.4.30.0110.01116.01
7.4.00.0040.00814.48
7.3.330.0070.00013.25
7.3.320.0050.00013.20
7.3.310.0030.00316.07
7.3.300.0000.00616.23
7.3.290.0080.00816.13
7.3.280.0100.00916.16
7.3.270.0140.00417.40
7.3.260.0100.01016.35
7.3.250.0070.01016.21
7.3.240.0170.00016.19
7.3.230.0070.01016.39
7.3.210.0070.01716.29
7.3.200.0110.00916.26
7.3.190.0030.01316.16
7.3.180.0070.01316.30
7.3.170.0100.00716.43
7.3.160.0060.01016.23
7.2.330.0070.01016.55
7.2.320.0090.01216.55
7.2.310.0100.00616.50
7.2.300.0000.01616.29
7.2.290.0110.00616.58
7.2.60.0070.00716.43
7.2.00.0070.00719.23
7.1.200.0030.00715.40
7.1.100.0030.01317.92
7.1.70.0000.00816.93
7.1.60.0040.00719.27
7.1.50.0100.00716.85
7.1.00.0000.07722.36
7.0.200.0000.00716.50
7.0.60.0070.05320.07
7.0.50.0030.05317.89
7.0.40.0070.08320.27
7.0.30.0570.04320.26
7.0.20.0100.04720.26
7.0.10.0200.07720.23
7.0.00.0030.05720.06
5.6.280.0030.05021.16
5.6.210.0030.08720.71
5.6.200.0070.05318.16
5.6.190.0030.06320.77
5.6.180.0270.08020.61
5.6.170.0270.05720.53
5.6.160.0100.03720.52
5.6.150.0170.04318.19
5.6.140.0130.05718.18
5.6.130.0030.04318.14
5.6.120.0100.08721.15
5.6.110.0030.06021.01
5.6.100.0000.04320.98
5.6.90.0100.08320.97
5.6.80.0100.07020.36
5.5.350.0030.08320.38
5.5.340.0100.07017.98
5.5.330.0170.05720.44
5.5.320.0170.08720.42
5.5.310.0230.04320.42
5.5.300.0030.08317.98
5.5.290.0130.08017.92
5.5.280.0000.04720.83
5.5.270.0130.07720.67
5.5.260.0130.07720.87
5.5.250.0070.08020.71
5.5.240.0270.05720.36
5.4.450.0570.07319.55
5.4.440.0670.05319.65
5.4.430.0930.07319.61
5.4.420.0700.06319.38
5.4.410.0930.06019.46
5.4.400.0570.06319.25
5.4.390.0600.06319.24
5.4.380.0900.07319.01
5.4.370.0670.06719.06
5.4.360.0630.07019.14
5.4.350.0530.06019.15
5.4.340.0730.06718.87
5.4.320.0730.06019.15
5.4.310.0970.06319.25
5.4.300.0830.07018.98
5.4.290.0170.05318.83
5.4.280.0170.05319.25
5.4.270.0070.06019.34
5.4.260.0600.06019.34
5.4.250.0900.05718.86
5.4.240.0730.05719.24
5.4.230.0900.05319.25
5.4.220.0930.06319.33
5.4.210.0800.05719.33
5.4.200.0800.06319.01
5.4.190.0970.05019.26
5.4.180.0900.05719.02
5.4.170.0970.06319.04
5.4.160.0830.06718.96
5.4.150.0730.06019.10
5.4.140.0830.06716.57
5.4.130.0870.05316.46
5.4.120.1030.03716.70
5.4.110.0830.05716.52
5.4.100.0730.06316.63
5.4.90.0730.05716.54
5.4.80.0730.06316.42
5.4.70.0070.07316.18
5.4.60.0070.05716.43
5.4.50.0000.03716.34
5.4.40.0300.05716.34
5.4.30.0330.05016.39
5.4.20.0300.07016.42

preferences:
61.31 ms | 400 KiB | 5 Q