3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pipe { var $stderr; } function words() { foreach (["foo", "bar", "baz"] as $word) { yield $word; } } function uppercase(Traversable $in, Generator $error) { foreach ($in as $word) { yield strtoupper($word); } } $stderr = function() { for (;;) { $error = (yield); echo "Error! $error\n"; } }; foreach (uppercase(words(), $stderr()) as $word) { echo "$word\n"; }

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.0140.00018.75
8.3.30.0040.01118.59
8.3.20.0040.00418.60
8.3.10.0030.00520.61
8.3.00.0070.01019.25
8.2.170.0110.00618.84
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00818.89
8.2.110.0000.01121.18
8.2.100.0100.00317.83
8.2.90.0060.00319.47
8.2.80.0050.00219.38
8.2.70.0080.00017.50
8.2.60.0060.00317.80
8.2.50.0050.00518.07
8.2.40.0040.00418.03
8.2.30.0000.00718.09
8.2.20.0090.00017.67
8.2.10.0070.00017.67
8.2.00.0040.00417.75
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.47
8.1.230.0050.00520.88
8.1.220.0050.00317.74
8.1.210.0040.00418.90
8.1.200.0000.01017.38
8.1.190.0020.00517.52
8.1.180.0030.00518.10
8.1.170.0040.00418.90
8.1.160.0040.00418.83
8.1.150.0040.00418.64
8.1.140.0000.00717.33
8.1.130.0030.00317.77
8.1.120.0000.00817.52
8.1.110.0000.00717.31
8.1.100.0030.00317.45
8.1.90.0080.00017.34
8.1.80.0080.00017.46
8.1.70.0000.00717.42
8.1.60.0080.00017.57
8.1.50.0000.00817.39
8.1.40.0000.00717.49
8.1.30.0030.00617.50
8.1.20.0050.00317.55
8.1.10.0050.00317.54
8.1.00.0000.00717.53
8.0.300.0000.00819.90
8.0.290.0040.00416.75
8.0.280.0000.00718.37
8.0.270.0070.00017.20
8.0.260.0020.00516.81
8.0.250.0000.00817.03
8.0.240.0070.00017.04
8.0.230.0000.00717.04
8.0.220.0000.00717.01
8.0.210.0070.00016.93
8.0.200.0030.00317.05
8.0.190.0040.00416.91
8.0.180.0070.00017.03
8.0.170.0000.00816.89
8.0.160.0030.00317.00
8.0.150.0000.00916.82
8.0.140.0080.00016.91
8.0.130.0030.00313.44
8.0.120.0040.00416.91
8.0.110.0070.00016.82
8.0.100.0040.00417.00
8.0.90.0050.00216.86
8.0.80.0090.01216.96
8.0.70.0050.00316.79
8.0.60.0040.00416.93
8.0.50.0050.00316.96
8.0.30.0060.01217.27
8.0.20.0100.00817.17
8.0.10.0030.00316.98
8.0.00.0130.00916.81
7.4.330.0030.00313.02
7.4.320.0060.00016.61
7.4.300.0000.00916.51
7.4.290.0050.00216.50
7.4.280.0080.00016.41
7.4.270.0030.00316.52
7.4.260.0030.00313.30
7.4.250.0030.00616.60
7.4.240.0070.00016.52
7.4.230.0040.00416.48
7.4.220.0040.01516.62
7.4.210.0110.00416.70
7.4.200.0000.00716.48
7.4.190.0070.00016.75
7.4.160.0040.01316.26
7.4.150.0090.00916.71
7.4.140.0110.00816.37
7.4.130.0080.00916.42
7.4.120.0070.01016.56
7.4.110.0060.01016.49
7.4.100.0150.00916.45
7.4.90.0100.00716.36
7.4.80.0030.01419.39
7.4.70.0110.00916.52
7.4.60.0080.00816.75
7.4.50.0050.00016.44
7.4.40.0070.01016.59
7.4.30.0120.00616.44
7.4.00.0060.00715.01
7.3.330.0000.00613.38
7.3.320.0030.00513.23
7.3.310.0000.00716.34
7.3.300.0040.00416.24
7.3.290.0070.00916.40
7.3.280.0080.00716.34
7.3.270.0130.00716.64
7.3.260.0180.00716.28
7.3.250.0120.00716.47
7.3.240.0130.00316.25
7.3.230.0060.01016.36
7.3.210.0090.00616.55
7.3.200.0070.01016.60
7.3.190.0070.01416.49
7.3.180.0080.00816.40
7.3.170.0160.00616.49
7.3.160.0000.01916.52
7.3.120.0070.00914.74
7.3.110.0070.01114.83
7.3.100.0100.00714.49
7.3.90.0120.00614.90
7.3.80.0100.00314.88
7.3.70.0070.00714.66
7.3.60.0040.00414.98
7.3.50.0030.00614.97
7.3.40.0030.01314.79
7.3.30.0100.00614.85
7.3.20.0030.01016.80
7.3.10.0050.01016.23
7.3.00.0090.00616.41
7.2.330.0110.00716.79
7.2.320.0090.00916.81
7.2.310.0090.00916.64
7.2.300.0090.01416.57
7.2.290.0120.00616.48
7.2.250.0150.00314.90
7.2.240.0090.00914.80
7.2.230.0060.00614.82
7.2.220.0090.00915.16
7.2.210.0030.01015.20
7.2.200.0060.00315.06
7.2.190.0000.01214.92
7.2.180.0060.00915.20
7.2.170.0030.01314.79
7.2.130.0110.00816.16
7.2.120.0110.00716.23
7.2.110.0080.01016.49
7.2.100.0100.00816.38
7.2.90.0170.00316.55
7.2.80.0110.01116.99
7.2.70.0170.00316.45
7.2.60.0160.00816.06
7.2.50.0100.00716.19
7.2.40.0110.00716.42
7.2.30.0180.00816.87
7.2.20.0100.01016.15
7.2.10.0140.01117.05
7.2.00.0120.01018.06
7.1.330.0040.01115.68
7.1.320.0100.00615.89
7.1.310.0070.00715.87
7.1.300.0110.00415.88
7.1.290.0140.00315.86
7.1.280.0100.00616.02
7.1.270.0070.00715.80
7.1.260.0060.00915.78
7.1.250.0070.00715.45
7.1.200.0100.00315.98
7.1.100.0040.00718.17
7.1.70.0040.00417.10
7.1.60.0030.02019.31
7.1.50.0080.00316.96
7.1.00.0030.07722.54
7.0.200.0130.01015.01
7.0.140.0000.07321.95
7.0.120.0070.06022.05
7.0.60.0070.07020.09
7.0.50.0130.08317.88
7.0.40.0030.07720.25
7.0.30.0300.05020.03
7.0.20.0270.07020.23
7.0.10.0030.04320.16
7.0.00.0000.08720.25
5.6.280.0000.07721.08
5.6.210.0100.08320.75
5.6.200.0130.07718.14
5.6.190.0070.04320.38
5.6.180.0300.04020.55
5.6.170.0400.06320.51
5.6.160.0030.08720.52
5.6.150.0070.05318.25
5.6.140.0100.08018.17
5.6.130.0070.05318.18
5.6.120.0100.03321.01
5.6.110.0000.04721.01
5.6.100.0000.06721.02
5.6.90.0030.05021.11
5.6.80.0030.07020.39
5.6.70.4400.03320.39
5.5.350.0030.05320.36
5.5.340.0030.06718.09
5.5.330.0100.04720.41
5.5.320.0270.07320.32
5.5.310.0330.05320.20
5.5.300.0070.07318.08
5.5.290.0000.04718.04
5.5.280.0100.07720.78
5.5.270.0030.07320.73
5.5.260.0100.06720.73
5.5.250.0170.07020.59
5.5.240.0030.07720.21
5.4.450.0070.06319.30
5.4.440.0070.08319.47
5.4.430.0070.05319.44
5.4.420.0130.06019.46
5.4.410.0070.04019.34
5.4.400.0100.07719.24
5.4.390.0070.08319.20
5.4.380.0100.04319.14
5.4.370.0130.03719.10
5.4.360.0000.08719.20
5.4.350.0130.05318.85
5.4.340.0030.04019.24
5.4.320.0130.07019.24
5.4.310.0030.04719.08
5.4.300.0130.06719.05
5.4.290.0130.05718.98
5.4.280.0130.06018.92
5.4.270.0030.08318.98
5.4.260.0030.08018.87
5.4.250.0100.03719.16
5.4.240.0170.06018.85
5.4.230.0000.08318.85
5.4.220.0100.08719.23
5.4.210.0030.06318.98
5.4.200.0000.06018.86
5.4.190.0030.07319.13
5.4.180.0030.06718.97
5.4.170.0030.07319.18
5.4.160.0000.04318.98
5.4.150.0070.03319.22
5.4.140.0070.07316.60
5.4.130.0100.04016.46
5.4.120.0030.04316.55
5.4.110.0070.07016.58
5.4.100.0030.05316.48
5.4.90.0070.04016.48
5.4.80.0130.05016.57
5.4.70.0070.07016.37
5.4.60.0170.04716.28
5.4.50.0100.06316.47
5.4.40.0100.06316.36
5.4.30.0070.06316.27
5.4.20.0070.03316.25
5.4.10.0000.06316.64
5.4.00.0070.07315.96
5.3.290.0130.07314.72
5.3.280.0070.07714.59
5.3.270.0070.07714.66
5.3.260.0030.03714.52
5.3.250.0070.07314.49
5.3.240.0070.07014.65
5.3.230.0030.04314.75
5.3.220.0100.03014.59
5.3.210.0030.05014.58
5.3.200.0030.05714.49
5.3.190.0100.07314.61
5.3.180.0030.05714.61
5.3.170.0070.05014.57
5.3.160.0200.06014.71
5.3.150.0070.07314.70
5.3.140.0130.07014.56
5.3.130.0000.05714.58
5.3.120.0100.03714.55
5.3.110.0100.07014.56
5.3.100.0100.07314.06
5.3.90.0130.05714.08
5.3.80.0100.07314.01
5.3.70.0100.06713.94
5.3.60.0030.08014.07
5.3.50.0070.07713.89
5.3.40.0000.05713.87
5.3.30.0070.06313.96
5.3.20.0000.04713.76
5.3.10.0100.07013.58
5.3.00.0100.04713.79
5.2.170.0070.05011.15
5.2.160.0030.04011.14
5.2.150.0070.05711.11
5.2.140.0030.07011.19
5.2.130.0070.03711.17
5.2.120.0070.05711.26
5.2.110.0030.06311.04
5.2.100.0100.05711.16
5.2.90.0000.05311.07
5.2.80.0030.03711.10
5.2.70.0030.04711.15
5.2.60.0100.05711.08
5.2.50.0070.06011.01
5.2.40.0030.04011.14
5.2.30.0030.04310.93
5.2.20.0030.05710.98
5.2.10.0000.05011.00
5.2.00.0030.06010.60
5.1.60.0000.04310.06
5.1.50.0070.05010.02
5.1.40.0030.0479.96
5.1.30.0030.06710.39
5.1.20.0030.05710.36
5.1.10.0030.0339.98
5.1.00.0030.02710.11
5.0.50.0030.0478.57
5.0.40.0070.0408.48
5.0.30.0070.0538.26
5.0.20.0030.0238.26
5.0.10.0030.0478.26
5.0.00.0000.0508.26
4.4.90.0000.0378.26
4.4.80.0030.0338.26
4.4.70.0030.0278.26
4.4.60.0100.0278.26
4.4.50.0030.0238.26
4.4.40.0000.0578.26
4.4.30.0000.0378.26
4.4.20.0030.0338.26
4.4.10.0070.0138.26
4.4.00.0000.0478.26
4.3.110.0030.0338.26
4.3.100.0000.0238.26
4.3.90.0070.0308.26
4.3.80.0030.0478.26
4.3.70.0030.0238.26
4.3.60.0000.0378.26
4.3.50.0000.0278.26
4.3.40.0030.0408.26
4.3.30.0000.0208.26
4.3.20.0030.0208.26
4.3.10.0000.0408.26
4.3.00.0070.0278.26

preferences:
47.14 ms | 400 KiB | 5 Q