3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen_one_to_three() { for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } } $generator = gen_one_to_three(); foreach ($generator as $value) { echo "$value\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.130.0040.00418.39
8.3.120.0000.00818.91
8.3.110.0030.01320.94
8.3.100.0080.00018.37
8.3.90.0090.00626.77
8.3.80.0030.00619.36
8.3.70.0070.01416.75
8.3.60.0170.00316.38
8.3.50.0130.00521.92
8.3.40.0090.00918.66
8.3.30.0070.00719.02
8.3.20.0120.00221.82
8.3.10.0090.00523.58
8.3.00.0080.00719.90
8.2.250.0080.00416.52
8.2.240.0060.00318.93
8.2.230.0080.00022.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0070.00716.58
8.2.180.0070.01418.11
8.2.170.0150.00022.96
8.2.160.0100.00319.08
8.2.150.0050.00622.48
8.2.140.0080.00523.48
8.2.130.0010.01024.12
8.2.120.0070.00421.53
8.2.110.0080.00821.79
8.2.100.0120.00619.93
8.2.90.0090.01019.46
8.2.80.0120.00819.17
8.2.70.0110.01018.95
8.2.60.0140.00318.98
8.2.50.0100.00419.48
8.2.40.0100.00919.88
8.2.30.0090.00619.51
8.2.20.0080.00618.64
8.2.10.0110.00619.27
8.2.00.0080.00519.12
8.1.300.0060.00318.48
8.1.290.0030.00730.84
8.1.280.0110.00325.92
8.1.270.0050.00723.96
8.1.260.0080.00425.07
8.1.250.0110.00225.94
8.1.240.0090.00720.39
8.1.230.0120.00318.87
8.1.220.0070.00819.01
8.1.210.0050.00919.61
8.1.200.0130.00518.82
8.1.190.0100.00418.74
8.1.180.0080.00818.86
8.1.170.0090.00719.26
8.1.160.0080.00619.16
8.1.150.0100.00220.35
8.1.140.0060.00618.66
8.1.130.0100.00518.76
8.1.120.0080.00418.25
8.1.110.0080.00718.46
8.1.100.0120.00318.22
8.1.90.0100.00418.28
8.1.80.0120.00218.42
8.1.70.0100.00418.30
8.1.60.0090.00518.13
8.1.50.0090.00718.10
8.1.40.0110.00418.10
8.1.30.0130.00418.18
8.1.20.0110.00618.35
8.1.10.0120.00618.09
8.1.00.0100.00617.85
8.0.300.0100.00218.78
8.0.290.0090.00617.45
8.0.280.0140.00218.02
8.0.270.0080.00418.11
8.0.260.0120.00317.66
8.0.250.0100.00418.00
8.0.240.0110.00217.92
8.0.230.0120.00417.31
8.0.220.0100.00617.19
8.0.210.0100.00717.14
8.0.200.0110.00417.21
8.0.190.0070.00717.21
8.0.180.0130.00317.38
8.0.170.0130.00317.16
8.0.160.0130.00317.36
8.0.150.0120.00517.07
8.0.140.0140.00517.10
8.0.130.0120.00516.58
8.0.120.0120.00517.12
8.0.110.0100.00617.45
8.0.100.0140.00417.05
8.0.90.0120.00617.10
8.0.80.0140.00617.08
8.0.70.0110.00617.35
8.0.60.0130.00717.12
8.0.50.0140.00417.11
8.0.30.0110.00617.40
8.0.20.0130.00517.38
8.0.10.0160.00517.14
8.0.00.0070.00917.97
7.4.330.0070.00415.46
7.4.320.0120.00516.85
7.4.300.0100.00717.17
7.4.290.0150.00517.00
7.4.280.0150.00616.75
7.4.270.0150.00417.03
7.4.260.0170.00216.75
7.4.250.0140.00516.79
7.4.240.0110.00516.76
7.4.230.0120.00416.79
7.4.220.0120.00517.07
7.4.210.0110.00616.77
7.4.200.0150.00317.06
7.4.190.0120.00616.76
7.4.180.0140.00616.90
7.4.160.0140.00416.95
7.4.150.0120.00716.92
7.4.140.0140.00517.09
7.4.130.0120.00616.64
7.4.120.0130.00716.62
7.4.110.0120.00616.61
7.4.100.0120.00616.70
7.4.90.0110.00716.59
7.4.80.0110.00816.88
7.4.70.0120.00616.61
7.4.60.0120.00616.59
7.4.50.0130.00616.53
7.4.40.0130.00616.52
7.4.30.0130.00416.61
7.4.20.0140.00516.59
7.4.10.0100.00816.57
7.4.00.0110.00716.90
7.3.330.0130.00516.13
7.3.320.0150.00316.12
7.3.310.0140.00516.58
7.3.300.0150.00616.71
7.3.290.0130.00616.56
7.3.280.0130.00716.52
7.3.270.0120.00716.58
7.3.260.0130.00716.49
7.3.250.0130.00716.56
7.3.240.0140.00516.55
7.3.230.0140.00616.59
7.3.220.0130.00716.49
7.3.210.0140.00516.48
7.3.200.0120.00716.50
7.3.190.0120.00616.47
7.3.180.0150.00816.50
7.3.170.0130.00716.55
7.3.160.0120.00616.54
7.3.150.0120.00616.50
7.3.140.0130.00616.58
7.3.130.0160.00516.53
7.3.120.0170.00816.32
7.3.110.0140.00816.48
7.3.100.0140.00916.44
7.3.90.0130.00616.65
7.3.80.0130.00616.40
7.3.70.0150.00616.28
7.3.60.0130.00616.26
7.3.50.0130.00716.27
7.3.40.0130.00616.16
7.3.30.0110.00716.09
7.3.20.0200.00616.85
7.3.10.0190.00716.73
7.3.00.0140.00716.84
7.2.340.0140.00716.71
7.2.330.0160.00616.71
7.2.320.0160.00616.66
7.2.310.0170.00616.63
7.2.300.0140.00816.67
7.2.290.0170.00516.63
7.2.280.0160.00716.67
7.2.270.0180.00716.71
7.2.260.0200.00816.63
7.2.250.0180.00716.71
7.2.240.0170.00616.65
7.2.230.0170.00816.64
7.2.220.0160.00716.67
7.2.210.0160.00816.50
7.2.200.0140.00916.46
7.2.190.0170.00616.44
7.2.180.0150.00916.42
7.2.170.0160.00616.39
7.2.160.0150.00816.26
7.2.150.0170.00817.17
7.2.140.0270.00617.00
7.2.130.0180.00616.95
7.2.120.0150.00917.07
7.2.110.0280.00617.05
7.2.100.0240.00917.00
7.2.90.0270.00617.04
7.2.80.0280.00917.06
7.2.70.0280.00617.08
7.2.60.0230.00717.05
7.2.50.0270.00717.06
7.2.40.0250.00817.07
7.2.30.0270.00817.11
7.2.20.0280.00617.09
7.2.10.0260.00817.15
7.2.00.0230.00817.10
7.1.330.0180.00716.66
7.1.320.0180.00716.80
7.1.310.0160.00616.47
7.1.300.0260.00716.29
7.1.290.0190.00716.29
7.1.280.0160.00716.12
7.1.270.0160.00716.04
7.1.260.0170.00615.96
7.1.250.0200.00615.95
7.1.240.0200.00815.93
7.1.230.0410.00615.90
7.1.220.0270.00515.95
7.1.210.0260.00715.89
7.1.200.0260.00815.93
7.1.190.0250.00715.91
7.1.180.0310.00515.90
7.1.170.0270.00815.92
7.1.160.0270.00715.92
7.1.150.0280.00515.89
7.1.140.0290.00715.92
7.1.130.0270.00615.89
7.1.120.0240.00715.90
7.1.110.0270.00815.87
7.1.100.0260.00715.88
7.1.90.0230.00715.89
7.1.80.0240.00615.92
7.1.70.0210.00715.95
7.1.60.0200.00716.01
7.1.50.0200.00715.98
7.1.40.0180.00915.91
7.1.30.0250.00615.95
7.1.20.0200.00715.86
7.1.10.0180.00815.93
7.1.00.0220.00615.89
7.0.330.0190.00715.60
7.0.320.0240.00715.63
7.0.310.0240.00515.59
7.0.300.0290.00615.57
7.0.290.0280.00615.57
7.0.280.0250.00515.59
7.0.270.0250.00615.56
7.0.260.0260.00615.56
7.0.250.0260.00815.69
7.0.240.0230.00815.67
7.0.230.0270.00615.65
7.0.220.0220.00715.65
7.0.210.0210.00615.73
7.0.200.0210.00615.67
7.0.190.0220.00615.67
7.0.180.0190.00715.66
7.0.170.0220.00515.68
7.0.160.0360.00715.66
7.0.150.0210.00615.64
7.0.140.0190.00815.68
7.0.130.0180.00615.66
7.0.120.0190.00715.68
7.0.110.0170.00715.75
7.0.100.0190.00615.62
7.0.90.0190.00615.62
7.0.80.0200.00615.61
7.0.70.0230.00615.63
7.0.60.0190.00615.58
7.0.50.0190.00615.61
7.0.40.0210.00715.43
7.0.30.0220.00515.38
7.0.20.0190.00815.36
7.0.10.0200.00715.37
7.0.00.0180.00715.51
5.6.400.0140.00715.58
5.6.390.0150.00715.61
5.6.380.0130.00815.42
5.6.370.0160.00715.46
5.6.360.0170.00615.43
5.6.350.0120.01115.42
5.6.340.0140.00715.49
5.6.330.0150.00715.40
5.6.320.0130.00815.43
5.6.310.0150.00815.44
5.6.300.0140.01115.71
5.6.290.0130.01115.78
5.6.280.0160.01015.74
5.6.270.0140.00915.74
5.6.260.0130.01115.70
5.6.250.0150.00915.75
5.6.240.0140.00915.78
5.6.230.0120.01215.77
5.6.220.0130.01015.74
5.6.210.0130.01015.72
5.6.200.0140.00915.75
5.6.190.0140.01015.77
5.6.180.0150.01115.74
5.6.170.0150.01015.71
5.6.160.0150.00915.77
5.6.150.0160.01015.80
5.6.140.0140.01215.77
5.6.130.0160.00715.79
5.6.120.0140.01115.76
5.6.110.0130.01115.78
5.6.100.0150.00915.67
5.6.90.0150.01015.69
5.6.80.0140.00915.67
5.6.70.0120.01015.63
5.6.60.0130.00915.67
5.6.50.0120.01015.64
5.6.40.0130.01015.69
5.6.30.0130.01115.64
5.6.20.0130.01115.65
5.6.10.0140.01115.69
5.6.00.0130.01015.64
5.5.380.0150.00915.30
5.5.370.0140.01115.17
5.5.360.0150.00815.18
5.5.350.0140.00915.15
5.5.340.0150.00915.17
5.5.330.0150.01015.16
5.5.320.0140.01115.24
5.5.310.0150.00815.16
5.5.300.0130.01215.19
5.5.290.0140.00815.28
5.5.280.0140.01015.14
5.5.270.0140.00915.11
5.5.260.0160.00815.17
5.5.250.0130.01115.16
5.5.240.0130.01015.13
5.5.230.0130.01115.14
5.5.220.0130.00915.10
5.5.210.0140.00915.08
5.5.200.0160.00815.09
5.5.190.0130.01015.07
5.5.180.0150.01015.07
5.5.170.0170.00914.93
5.5.160.0150.01115.11
5.5.150.0150.00815.08
5.5.140.0140.00915.03
5.5.130.0150.00915.09
5.5.120.0140.00815.00
5.5.110.0120.01115.04
5.5.100.0120.01115.05
5.5.90.0120.00915.08
5.5.80.0110.01015.13
5.5.70.0120.01015.16
5.5.60.0130.00915.08
5.5.50.0130.00715.06
5.5.40.0140.00815.10
5.5.30.0130.00815.09
5.5.20.0130.00815.05
5.5.10.0130.00915.02
5.5.00.0140.00815.15
5.4.450.0110.00613.11
5.4.440.0110.00813.05
5.4.430.0080.00913.05
5.4.420.0110.00813.09
5.4.410.0120.01013.09
5.4.400.0110.00713.02
5.4.390.0120.00613.00
5.4.380.0100.00813.01
5.4.370.0110.00813.05
5.4.360.0100.00712.99
5.4.350.0100.00813.03
5.4.340.0110.00713.02
5.4.330.0130.00712.67
5.4.320.0110.00713.03
5.4.310.0100.00613.32
5.4.300.0110.00713.02
5.4.290.0120.00613.02
5.4.280.0120.00612.97
5.4.270.0100.00713.07
5.4.260.0120.00713.03
5.4.250.0110.00613.04
5.4.240.0120.00613.01
5.4.230.0110.00713.02
5.4.220.0110.00612.96
5.4.210.0100.00812.98
5.4.200.0120.00612.98
5.4.190.0100.00912.96
5.4.180.0110.00712.99
5.4.170.0110.00912.96
5.4.160.0110.00713.26
5.4.150.0100.00912.97
5.4.140.0100.00712.88
5.4.130.0100.00612.96
5.4.120.0120.00712.88
5.4.110.0110.00612.90
5.4.100.0130.00512.92
5.4.90.0110.00812.88
5.4.80.0120.00712.88
5.4.70.0110.00712.88
5.4.60.0100.00612.88
5.4.50.0100.00712.94
5.4.40.0100.00812.91
5.4.30.0110.00612.87
5.4.20.0110.00612.87
5.4.10.0100.00712.89
5.4.00.0090.00712.85
5.3.290.0120.00712.85
5.3.280.0120.00812.76
5.3.270.0100.00812.83
5.3.260.0110.00812.85
5.3.250.0120.00712.87
5.3.240.0100.00712.80
5.3.230.0100.00712.77
5.3.220.0100.00812.79
5.3.210.0110.00712.80
5.3.200.0110.00712.79
5.3.190.0110.00712.85
5.3.180.0110.00712.93
5.3.170.0100.00712.92
5.3.160.0110.00712.92
5.3.150.0110.00612.92
5.3.140.0090.00812.89
5.3.130.0090.00912.88
5.3.120.0100.00712.87
5.3.110.0110.00712.86
5.3.100.0080.00812.87
5.3.90.0100.00712.90
5.3.80.0100.00712.84
5.3.70.0080.00812.85
5.3.60.0090.00812.86
5.3.50.0100.00912.84
5.3.40.0110.00612.85
5.3.30.0100.00612.82
5.3.20.0110.00612.78
5.3.10.0090.01012.69
5.3.00.0090.00812.72
5.2.170.0190.00216.18

preferences:
29.93 ms | 403 KiB | 5 Q