3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace GeneratorExample; function uppercase(\Traversable $in) { foreach ($in as $word) { yield strtoupper($word); } } function reverse(\Traversable $in) { foreach ($in as $word) { yield strrev($word); } } function each_println(\Traversable $in) { foreach ($in as $line) { echo "$line\n"; } } $words = new \ArrayIterator(["foo", "bar", "baz"]); each_println(reverse(uppercase($words)));

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.0070.01318.56
8.3.50.0150.00322.05
8.3.40.0130.00718.85
8.3.30.0140.00719.04
8.3.20.0070.00020.29
8.3.10.0040.00423.52
8.3.00.0060.00320.68
8.2.180.0120.00916.50
8.2.170.0090.00622.96
8.2.160.0110.00322.08
8.2.150.0090.00024.18
8.2.140.0030.00524.66
8.2.130.0030.00526.16
8.2.120.0040.00419.48
8.2.110.0040.00422.16
8.2.100.0100.00317.64
8.2.90.0090.00019.24
8.2.80.0040.00417.97
8.2.70.0120.00017.50
8.2.60.0050.00317.93
8.2.50.0070.00318.07
8.2.40.0070.00318.22
8.2.30.0080.00318.12
8.2.20.0070.00317.58
8.2.10.0030.00617.75
8.2.00.0030.00617.68
8.1.280.0070.01125.92
8.1.270.0090.00023.81
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.92
8.1.230.0040.00719.10
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0050.00317.52
8.1.180.0000.00918.10
8.1.170.0060.00318.59
8.1.160.0040.00421.95
8.1.150.0000.00718.57
8.1.140.0050.00317.47
8.1.130.0000.00717.79
8.1.120.0050.00317.52
8.1.110.0070.00017.48
8.1.100.0050.00317.50
8.1.90.0100.00017.39
8.1.80.0000.00717.45
8.1.70.0000.00717.39
8.1.60.0060.00317.57
8.1.50.0030.00617.51
8.1.40.0000.00717.51
8.1.30.0000.00817.62
8.1.20.0080.00017.73
8.1.10.0090.00017.43
8.1.00.0000.00817.39
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.36
8.0.270.0000.00717.27
8.0.260.0000.00716.89
8.0.250.0030.00316.98
8.0.240.0030.00516.87
8.0.230.0030.00316.91
8.0.220.0030.00316.92
8.0.210.0030.00316.93
8.0.200.0030.00316.95
8.0.190.0000.00816.92
8.0.180.0030.00716.88
8.0.170.0000.00716.95
8.0.160.0050.00216.99
8.0.150.0050.00316.84
8.0.140.0040.00416.94
8.0.130.0030.00313.43
8.0.120.0000.00816.91
8.0.110.0050.00316.93
8.0.100.0040.00416.75
8.0.90.0000.00716.96
8.0.80.0130.00317.03
8.0.70.0040.00416.91
8.0.60.0000.00716.95
8.0.50.0000.00717.01
8.0.30.0060.01317.16
8.0.20.0150.00317.40
8.0.10.0000.00817.09
8.0.00.0080.01016.85
7.4.330.0000.00515.15
7.4.320.0000.00616.51
7.4.300.0000.00816.46
7.4.290.0040.00416.56
7.4.280.0000.00716.42
7.4.270.0000.00716.63
7.4.260.0070.00016.59
7.4.250.0040.00416.58
7.4.240.0010.00616.48
7.4.230.0000.00716.44
7.4.220.0100.01716.49
7.4.210.0040.01016.55
7.4.200.0000.00716.35
7.4.190.0000.00816.60
7.4.160.0090.00616.51
7.4.150.0090.01217.40
7.4.140.0120.00517.86
7.4.130.0120.00816.59
7.4.120.0090.01116.52
7.4.110.0170.00016.38
7.4.100.0090.00916.50
7.4.90.0190.00616.46
7.4.80.0130.00916.67
7.4.70.0140.00316.52
7.4.60.0080.00816.43
7.4.50.0080.00016.54
7.4.40.0060.00922.77
7.4.30.0100.00716.58
7.4.00.0070.00914.87
7.3.330.0000.00613.29
7.3.320.0050.00013.11
7.3.310.0050.00216.35
7.3.300.0030.00316.18
7.3.290.0100.00716.33
7.3.280.0070.01016.28
7.3.270.0130.00617.40
7.3.260.0100.00716.30
7.3.250.0070.01216.41
7.3.240.0080.00916.66
7.3.230.0060.01016.40
7.3.210.0070.01016.52
7.3.200.0030.01319.39
7.3.190.0140.00316.58
7.3.180.0030.01416.39
7.3.170.0120.00316.41
7.3.160.0040.01216.46
7.3.120.0130.00514.90
7.3.110.0040.00814.51
7.3.100.0110.00415.07
7.3.90.0070.00714.79
7.3.80.0030.01014.82
7.3.70.0040.00814.71
7.3.60.0070.00314.69
7.3.50.0060.00914.73
7.3.40.0080.00614.69
7.3.30.0110.00314.74
7.3.20.0030.00916.54
7.3.10.0120.00416.55
7.3.00.0070.00816.63
7.2.330.0160.00016.54
7.2.320.0110.01116.51
7.2.310.0030.01316.56
7.2.300.0100.00616.70
7.2.290.0130.00316.45
7.2.250.0070.01314.98
7.2.240.0030.01315.10
7.2.230.0000.01514.97
7.2.220.0070.00315.21
7.2.210.0090.00314.54
7.2.200.0070.00714.98
7.2.190.0000.01415.20
7.2.180.0000.01015.15
7.2.170.0030.01314.91
7.2.130.0080.00616.77
7.2.120.0130.00616.87
7.2.110.0080.00716.93
7.2.100.0100.00716.89
7.2.90.0100.00316.79
7.2.80.0090.00916.68
7.2.70.0050.00816.62
7.2.60.0070.01016.97
7.2.50.0060.00416.60
7.2.40.0040.00816.80
7.2.30.0090.00816.84
7.2.20.0080.00516.93
7.2.10.0050.00816.87
7.2.00.0090.00917.64
7.1.330.0030.01415.88
7.1.320.0000.01715.86
7.1.310.0040.00415.77
7.1.300.0120.00315.41
7.1.290.0040.00815.77
7.1.280.0050.00515.75
7.1.270.0040.00715.95
7.1.260.0000.01615.93
7.1.250.0090.00915.59
7.1.200.0040.01115.88
7.1.100.0070.00718.17
7.1.70.0000.00716.99
7.1.60.0170.00719.32
7.1.50.0100.01316.99
7.1.00.0070.07322.44
7.0.200.0110.00016.69
7.0.140.0030.07721.95
7.0.100.0170.09019.90
7.0.90.0030.08719.93
7.0.80.0100.07319.88
7.0.70.0000.08319.92
7.0.60.0170.04719.83
7.0.50.0130.04320.39
7.0.40.0170.06719.98
7.0.30.0070.06320.09
7.0.20.0070.08320.00
7.0.10.0030.08720.10
7.0.00.0030.07320.14
5.6.280.0070.06720.92
5.6.250.0000.06020.74
5.6.240.0100.05020.63
5.6.230.0200.07720.55
5.6.220.0030.07020.54
5.6.210.0170.06720.48
5.6.200.0030.04321.04
5.6.190.0070.04021.07
5.6.180.0100.08721.10
5.6.170.0130.07721.09
5.6.160.0100.08021.07
5.6.150.0130.06721.12
5.6.140.0100.04721.18
5.6.130.0100.07721.05
5.6.120.0100.07721.02
5.6.110.0030.05021.02
5.6.100.0100.07721.08
5.6.90.0030.09020.95
5.6.80.0000.08320.47
5.6.70.0070.06720.34
5.6.60.0070.06020.40
5.6.50.0100.07020.44
5.6.40.0030.07320.54
5.6.30.0130.07020.33
5.6.20.0030.08320.42
5.6.10.0030.04020.48
5.6.00.0030.06020.30
5.5.380.0170.07720.45
5.5.370.0070.05020.38
5.5.360.0170.08020.52
5.5.350.0070.07020.30
5.5.340.0070.05320.84
5.5.330.0070.04020.89
5.5.320.0070.05720.84
5.5.310.0130.07320.94
5.5.300.0000.07720.84
5.5.290.0130.06020.79
5.5.280.0070.05720.63
5.5.270.0100.07020.80
5.5.260.0100.07320.91
5.5.250.0000.08020.75
5.5.240.0030.08020.03
5.5.230.0130.07320.03
5.5.220.0000.05320.21
5.5.210.0070.08020.32
5.5.200.0170.05720.16
5.5.190.0100.07020.25
5.5.180.0070.04020.25
5.5.160.0000.07720.17
5.5.150.0030.08020.23
5.5.140.0130.07020.15
5.5.130.0100.07720.13
5.5.120.0100.07720.25
5.5.110.0230.06320.21
5.5.100.0100.07720.13
5.5.90.0130.06720.10
5.5.80.0070.07320.09
5.5.70.0070.07719.95
5.5.60.0100.05320.07
5.5.50.0170.04020.16
5.5.40.0100.07020.17
5.5.30.0030.04320.05
5.5.20.0100.06720.06
5.5.10.0030.07020.14
5.5.00.0070.04320.05
5.4.450.0170.06719.54
5.4.440.0130.07719.36
5.4.430.0130.07019.22
5.4.420.0130.07319.35
5.4.410.0070.06019.28
5.4.400.0070.08019.01
5.4.390.0070.04719.21
5.4.380.0100.06319.14
5.4.370.0070.05719.21
5.4.360.0030.07719.21
5.4.350.0170.06319.19
5.4.340.0000.04719.21
5.4.320.0030.03719.14
5.4.310.0200.05718.90
5.4.300.0030.06318.88
5.4.290.0030.06318.90
5.4.280.0130.07019.16
5.4.270.0070.05319.13
5.4.260.0070.06319.14
5.4.250.0030.04719.16
5.4.240.0070.06319.04
5.4.230.0100.07319.04
5.4.220.0070.07319.00
5.4.210.0070.04019.02
5.4.200.0100.07319.04
5.4.190.0070.04018.87
5.4.180.0030.06019.22
5.4.170.0030.04319.02
5.4.160.0130.04318.93
5.4.150.0030.04319.10
5.4.140.0070.04316.46
5.4.130.0030.07016.43
5.4.120.0030.04016.40
5.4.110.0130.04016.43
5.4.100.0070.04716.47
5.4.90.0070.05716.48
5.4.80.0000.07316.46
5.4.70.0000.07016.31
5.4.60.0130.05716.32
5.4.50.0100.05016.41
5.4.40.0100.06016.35
5.4.30.0000.04316.32
5.4.20.0030.07316.33
5.4.10.0070.07016.36
5.4.00.0030.04315.88
5.3.290.0030.08014.80
5.3.280.0130.07714.60
5.3.270.0100.07014.59
5.3.260.0030.04314.66
5.3.250.0100.06314.64
5.3.240.0070.05714.64
5.3.230.0070.07014.74
5.3.220.0070.04014.70
5.3.210.0100.07714.64
5.3.200.0030.07314.69
5.3.190.0070.07314.54
5.3.180.0030.08314.54
5.3.170.0030.04314.55
5.3.160.0070.07014.55
5.3.150.0000.03714.55
5.3.140.0100.07314.49
5.3.130.0030.07314.66
5.3.120.0170.06314.53
5.3.110.0130.07314.56
5.3.100.0030.08014.02
5.3.90.0070.06714.08
5.3.80.0070.06714.05
5.3.70.0130.06014.07
5.3.60.0070.06314.00
5.3.50.0100.07014.02
5.3.40.0100.05713.87
5.3.30.0100.06713.91
5.3.20.0070.07313.80
5.3.10.0030.07313.65
5.3.00.0100.03713.57
5.2.170.0070.06312.18
5.2.160.0100.06012.18
5.2.150.0000.03712.18
5.2.140.0030.06312.18
5.2.130.0100.05712.18
5.2.120.0070.06312.18
5.2.110.0100.05712.18
5.2.100.0030.03712.18
5.2.90.0000.03712.18
5.2.80.0070.03312.18
5.2.70.0070.02712.18
5.2.60.0100.02712.18
5.2.50.0000.03312.18
5.2.40.0070.02712.18
5.2.30.0070.02712.18
5.2.20.0100.02312.18
5.2.10.0000.03312.18
5.2.00.0030.03012.18
5.1.60.0030.02312.18
5.1.50.0000.02712.18
5.1.40.0030.02312.18
5.1.30.0100.02012.18
5.1.20.0000.02712.18
5.1.10.0000.03012.18
5.1.00.0030.02312.18
5.0.50.0030.02012.18
5.0.40.0000.02012.18
5.0.30.0030.03312.18
5.0.20.0070.04012.18
5.0.10.0000.02712.18
5.0.00.0030.05312.18
4.4.90.0000.02312.18
4.4.80.0030.01312.18
4.4.70.0000.01712.18
4.4.60.0000.01312.18
4.4.50.0030.02012.18
4.4.40.0000.02312.18
4.4.30.0000.01712.18
4.4.20.0000.01712.18
4.4.10.0000.01712.18
4.4.00.0030.02312.18
4.3.110.0000.02312.18
4.3.100.0000.03012.18
4.3.90.0070.01712.18
4.3.80.0000.05712.18
4.3.70.0030.02312.18
4.3.60.0000.01712.18
4.3.50.0000.03012.18
4.3.40.0030.03012.18
4.3.30.0030.03312.18
4.3.20.0000.03312.18
4.3.10.0000.02012.18
4.3.00.0000.02012.18

preferences:
43.36 ms | 400 KiB | 5 Q