3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { for ($i = 11; $i < 12; $i++) { echo 'In generator foo.......',"\n"; $string=(yield $i); if (isset($string)) { echo "generator foo displaying sent data ..."; echo "Sent data is $string","\n"; } } echo 'generator done and closed.',"\n"; return; } $generator = foo(); foreach ($generator as $value) { echo "Back in generator object ........</b>\n"; echo "Fetched value is $value\n"; if ($value == 13) { echo "generator object injecting ....\n"; $generator->send('Hello World'); } }

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.0060.01218.53
8.3.30.0140.00018.95
8.3.20.0000.00820.20
8.3.10.0050.00323.52
8.3.00.0040.00420.60
8.2.170.0100.01022.96
8.2.160.0000.01322.16
8.2.150.0080.00024.18
8.2.140.0160.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00322.02
8.2.110.0060.00322.26
8.2.100.0120.00017.72
8.2.90.0040.00419.27
8.2.80.0080.00017.97
8.2.70.0000.00917.50
8.2.60.0050.00317.93
8.2.50.0050.00318.07
8.2.40.0070.00318.16
8.2.30.0030.00618.17
8.2.20.0060.00317.72
8.2.10.0040.00417.75
8.2.00.0000.00717.75
8.1.270.0030.00623.98
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00023.78
8.1.230.0100.00319.09
8.1.220.0030.00617.79
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0080.00017.55
8.1.180.0060.00318.10
8.1.170.0000.00918.50
8.1.160.0000.01021.89
8.1.150.0000.00718.56
8.1.140.0040.00417.44
8.1.130.0000.00717.75
8.1.120.0040.00417.41
8.1.110.0000.00717.44
8.1.100.0030.00517.50
8.1.90.0050.00217.37
8.1.80.0040.00417.43
8.1.70.0040.00417.33
8.1.60.0030.00717.58
8.1.50.0040.00417.42
8.1.40.0000.00917.40
8.1.30.0060.00317.50
8.1.20.0070.00017.59
8.1.10.0000.00717.46
8.1.00.0000.00817.34
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0030.00318.44
8.0.270.0040.00417.26
8.0.260.0030.00316.82
8.0.250.0030.00316.93
8.0.240.0050.00316.84
8.0.230.0030.00317.02
8.0.220.0040.00416.94
8.0.210.0040.00416.95
8.0.200.0030.00316.82
8.0.190.0060.00316.88
8.0.180.0000.00716.83
8.0.170.0040.00416.83
8.0.160.0040.00416.86
8.0.150.0000.00716.81
8.0.140.0040.00416.90
8.0.130.0050.00013.32
8.0.120.0000.00816.75
8.0.110.0000.00816.92
8.0.100.0020.00516.88
8.0.90.0040.00416.75
8.0.80.0120.00916.82
8.0.70.0080.00016.85
8.0.60.0000.00816.90
8.0.50.0040.00416.85
8.0.30.0120.01117.18
8.0.20.0090.00917.40
8.0.10.0090.00017.09
8.0.00.0110.00716.73
7.4.330.0030.00315.08
7.4.320.0000.00716.42
7.4.300.0000.00616.50
7.4.290.0000.01016.40
7.4.280.0000.00716.50
7.4.270.0030.00316.54
7.4.260.0040.00416.52
7.4.250.0000.00816.52
7.4.240.0030.00416.54
7.4.230.0080.00016.61
7.4.220.0100.00716.72
7.4.210.0100.00816.51
7.4.200.0040.00416.34
7.4.190.0030.00316.70
7.4.160.0030.01216.48
7.4.150.0060.01017.40
7.4.140.0070.00917.86
7.4.130.0060.01016.46
7.4.120.0080.00816.60
7.4.110.0060.01016.52
7.4.100.0120.01116.53
7.4.90.0130.00616.52
7.4.80.0140.00416.61
7.4.70.0090.00916.26
7.4.60.0110.00616.31
7.4.50.0050.00316.18
7.4.40.0100.00622.77
7.4.30.0030.01316.55
7.4.10.0090.00915.16
7.4.00.0090.00815.03
7.3.330.0060.00013.36
7.3.320.0030.00313.35
7.3.310.0030.00316.21
7.3.300.0030.00316.38
7.3.290.0270.01116.34
7.3.280.0130.00616.37
7.3.270.0060.01217.40
7.3.260.0130.01016.41
7.3.250.0160.00116.35
7.3.240.0110.00716.35
7.3.230.0030.01416.46
7.3.210.0120.01216.52
7.3.200.0030.01619.39
7.3.190.0160.00716.54
7.3.180.0100.00716.66
7.3.170.0000.01616.30
7.3.160.0170.00316.61
7.3.130.0000.01514.99
7.3.120.0080.00814.80
7.3.110.0070.01114.76
7.3.100.0080.00714.71
7.3.90.0090.00514.94
7.3.80.0070.00614.87
7.3.70.0000.01214.78
7.3.60.0090.00514.89
7.3.50.0030.00914.80
7.3.40.0070.00914.84
7.3.30.0050.00614.74
7.3.20.0060.00816.54
7.3.10.0070.00816.54
7.3.00.0080.00916.65
7.2.330.0130.00616.73
7.2.320.0170.00616.64
7.2.310.0130.00416.82
7.2.300.0170.00316.52
7.2.290.0160.00016.77
7.2.260.0120.00714.97
7.2.250.0120.00514.93
7.2.240.0050.01215.06
7.2.230.0080.00314.80
7.2.220.0070.00415.10
7.2.210.0030.01215.05
7.2.200.0050.01115.04
7.2.190.0080.00514.90
7.2.180.0060.00815.10
7.2.170.0010.01015.05
7.2.160.0000.01414.85
7.2.150.0090.00916.92
7.2.140.0070.01116.72
7.2.130.0070.00816.81
7.2.120.0090.00716.92
7.2.110.0050.01116.88
7.2.100.0080.00617.00
7.2.90.0050.00917.07
7.2.80.0060.00816.81
7.2.70.0060.00617.08
7.2.60.0110.00417.03
7.2.50.0030.00816.91
7.2.40.0090.00416.95
7.2.30.0060.00816.96
7.2.20.0070.00616.88
7.2.10.0060.00916.98
7.2.00.0040.01117.56
7.1.330.0070.00715.90
7.1.320.0060.00615.47
7.1.310.0100.00615.86
7.1.300.0100.00215.77
7.1.290.0070.00715.89
7.1.280.0060.00415.65
7.1.270.0020.00915.87
7.1.260.0080.00915.79
7.1.250.0030.01015.83
7.1.240.0100.00615.66
7.1.230.0100.00715.67
7.1.220.0110.00715.97
7.1.210.0040.01115.54
7.1.200.0080.00615.92
7.1.190.0000.01215.62
7.1.180.0030.00916.00
7.1.170.0030.00915.75
7.1.160.0040.00815.96
7.1.150.0040.00515.76
7.1.140.0090.00615.79
7.1.130.0040.00815.91
7.1.120.0140.00315.71
7.1.110.0040.01115.71
7.1.100.0070.00716.89
7.1.90.0070.00715.71
7.1.80.0060.00615.64
7.1.70.0040.00916.36
7.1.60.0060.01117.61
7.1.50.0080.00916.36
7.1.40.0060.00615.71
7.1.30.0030.00715.87
7.1.20.0060.00315.79
7.1.10.0030.00615.79
7.1.00.0110.03719.01
7.0.330.0090.00615.36
7.0.320.0060.00615.53
7.0.310.0070.00715.42
7.0.300.0030.00615.39
7.0.290.0120.00315.31
7.0.280.0030.01315.46
7.0.270.0040.01115.24
7.0.260.0090.00315.46
7.0.250.0100.00715.43
7.0.240.0000.01615.45
7.0.230.0000.01515.10
7.0.220.0080.00615.57
7.0.210.0030.01215.37
7.0.200.0060.00416.05
7.0.190.0030.00915.18
7.0.180.0000.01415.43
7.0.170.0060.00315.53
7.0.160.0090.00615.40
7.0.150.0100.00315.19
7.0.140.0060.03718.79
7.0.130.0000.01415.07
7.0.120.0070.00315.29
7.0.110.0060.00615.55
7.0.100.0040.00815.21
7.0.90.0100.00315.60
7.0.80.0100.00315.17
7.0.70.0100.00315.32
7.0.60.0080.02817.68
7.0.50.0020.02916.73
7.0.40.0130.04016.82
7.0.30.0130.02316.88
7.0.20.0150.02916.92
7.0.10.0150.02916.89
7.0.00.0070.03316.79
5.6.400.0030.00914.36
5.6.390.0120.00614.61
5.6.380.0060.00614.11
5.6.370.0070.00714.48
5.6.360.0060.00613.98
5.6.350.0090.00614.36
5.6.340.0000.00914.50
5.6.330.0000.00914.24
5.6.320.0000.01414.11
5.6.310.0030.00714.46
5.6.300.0100.00314.32
5.6.290.0040.01114.64
5.6.280.0100.03617.88
5.6.270.0000.01114.04
5.6.260.0070.00714.75
5.6.250.0090.00614.68
5.6.240.0100.00314.34
5.6.230.0080.00414.38
5.6.220.0000.01514.19
5.6.210.0110.03617.38
5.6.200.0030.02516.32
5.6.190.0020.02817.34
5.6.180.0270.04217.35
5.6.170.0120.03417.37
5.6.160.0100.04217.50
5.6.150.0010.03116.18
5.6.140.0050.04416.48
5.6.130.0040.03816.31
5.6.120.0090.04217.73
5.6.110.0120.02017.63
5.6.100.0100.02317.63
5.6.90.0060.04517.67
5.6.80.0050.02117.39
5.6.70.1570.02817.31
5.6.60.0030.00914.34
5.6.50.0050.00314.36
5.6.40.0030.00614.15
5.6.30.0000.01214.30
5.6.20.0050.00814.24
5.6.10.0060.00314.20
5.6.00.0040.00814.13
5.5.380.0030.01414.29
5.5.370.0060.00914.36
5.5.360.0040.00414.20
5.5.350.0030.04017.19
5.5.340.0080.02016.12
5.5.330.0070.03217.28
5.5.320.0040.04117.29
5.5.310.0200.03717.25
5.5.300.0100.02315.97
5.5.290.0070.03616.12
5.5.280.0070.02517.71
5.5.270.0090.04217.54
5.5.260.0130.04217.22
5.5.250.0050.04017.35
5.5.240.0050.04317.09
5.5.230.0040.01114.12
5.5.220.0040.00814.10
5.5.210.0070.00714.43
5.5.200.0040.00414.05
5.5.190.0040.01114.36
5.5.180.0000.01114.15
5.5.170.0000.01314.28
5.5.160.0070.00714.11
5.5.150.0060.00614.07
5.5.140.0060.00614.01
5.5.130.0030.01013.96
5.5.120.0090.00614.37
5.5.110.0030.00614.06
5.5.100.0030.00914.07
5.5.90.0090.00314.01
5.5.80.0030.01314.30
5.5.70.0060.00614.11
5.5.60.0030.01013.93
5.5.50.0040.01114.11
5.5.40.0100.00314.17
5.5.30.0060.00614.19
5.5.20.0100.00314.25
5.5.10.0030.01013.92
5.5.00.0150.00014.20
5.4.450.2420.02316.41
5.4.440.1920.01816.35
5.4.430.1560.01716.45
5.4.420.1920.02116.42
5.4.410.1840.01816.35
5.4.400.1830.02016.29
5.4.390.1930.02016.30
5.4.380.2220.02016.37
5.4.370.2390.01716.29
5.4.360.2380.02316.34
5.4.350.2260.01516.21
5.4.340.2620.02816.34
5.4.330.0000.00813.52
5.4.320.2510.02416.19
5.4.310.2300.02116.19
5.4.300.2450.02216.19
5.4.290.2390.02016.32
5.4.280.2320.02816.25
5.4.270.2130.02416.19
5.4.260.2320.02216.25
5.4.250.2720.01916.25
5.4.240.2150.02516.33
5.4.230.2370.01816.39
5.4.220.2030.02216.19
5.4.210.1980.02316.30
5.4.200.2070.02416.24
5.4.190.1980.02316.36
5.4.180.1800.02416.30
5.4.170.2360.01816.30
5.4.160.2370.02216.18
5.4.150.2320.02716.33
5.4.140.2280.02014.90
5.4.130.2320.02114.93
5.4.120.2050.02514.90
5.4.110.2320.01715.04
5.4.100.2070.01814.99
5.4.90.2270.01215.04
5.4.80.2120.02015.02
5.4.70.2070.02414.92
5.4.60.1180.02115.00
5.4.50.0100.03315.04
5.4.40.1850.01815.03
5.4.30.2050.02015.00
5.4.20.2250.01815.01
5.4.10.2350.01715.01
5.4.00.2370.02114.74
5.3.290.2290.02014.17
5.3.280.2300.02514.11
5.3.270.2170.01814.17
5.3.260.1820.02214.03
5.3.250.2000.02514.07
5.3.240.2150.02014.10
5.3.230.1970.02114.01
5.3.220.2000.02414.06
5.3.210.2030.02514.00
5.3.200.2220.02414.00
5.3.190.2350.02714.01
5.3.180.2050.02214.08
5.3.170.2100.02214.00
5.3.160.0030.02314.05
5.3.150.0060.03514.10
5.3.140.1880.02314.02
5.3.130.2400.02114.06
5.3.120.2310.02014.06
5.3.110.2300.01814.02
5.3.100.2300.02513.80
5.3.90.2150.02013.73
5.3.80.2180.02513.84
5.3.70.1930.02013.77
5.3.60.1580.02413.77
5.3.50.1730.02013.84
5.3.40.1940.01813.70
5.3.30.0670.02013.72
5.3.20.0120.01513.61
5.3.10.1670.02013.54
5.3.00.1850.01813.69
5.2.170.2870.03311.04
5.2.160.2400.03711.07
5.2.150.2770.02711.22
5.2.140.0000.03711.14
5.2.130.0030.03011.10
5.2.120.1900.02311.03
5.2.110.3070.02711.02
5.2.100.3000.03011.11
5.2.90.2800.02711.00
5.2.80.2770.02311.04
5.2.70.2930.02711.25
5.2.60.2570.02710.95
5.2.50.2630.03010.93
5.2.40.2630.03010.97
5.2.30.2400.03310.94
5.2.20.2800.02711.01
5.2.10.2670.03010.83
5.2.00.2870.03010.71
5.1.60.3230.02310.19
5.1.50.2200.02310.19
5.1.40.2230.02310.19
5.1.30.2630.01710.31
5.1.20.2870.02710.32
5.1.10.2630.02710.19
5.1.00.2400.03710.19
5.0.50.1300.02010.19
5.0.40.1230.02010.19
5.0.30.1430.03710.19
5.0.20.1170.02310.19
5.0.10.0870.03310.19
5.0.00.1900.02710.19
4.4.90.0270.01710.19
4.4.80.1230.01310.19
4.4.70.1700.01010.19
4.4.60.1570.02010.19
4.4.50.1700.01310.19
4.4.40.1370.02310.19
4.4.30.1230.01310.19
4.4.20.1870.01710.19
4.4.10.1570.01710.19
4.4.00.1230.01710.19
4.3.110.1270.01310.19
4.3.100.1230.01310.19
4.3.90.1400.01010.19
4.3.80.0900.03010.19
4.3.70.1200.01710.19
4.3.60.1330.01710.19
4.3.50.1270.01310.19
4.3.40.1470.02710.19
4.3.30.0870.02010.19
4.3.20.0900.02310.19
4.3.10.0800.01710.19
4.3.00.0930.02310.19

preferences:
42.7 ms | 400 KiB | 5 Q