3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xrange($start, $limit, $step = 1) { if ($start < $limit) { if ($step <= 0) { echo 'yoyo'; } for ($i = $start; $i <= $limit; $i += $step) { yield $i; } } else { if ($step >= 0) { throw new LogicException('Step must be -ve'); } for ($i = $start; $i >= $limit; $i += $step) { yield $i; } } } echo 'Single digit odd numbers from xrange(): '; foreach (xrange(1, 9, -2) as $number) { echo "$number "; }

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.0300.00616.61
8.3.50.0250.01522.94
8.3.40.0330.01018.60
8.3.30.0340.00618.97
8.3.20.0150.00720.30
8.3.10.0090.00623.52
8.3.00.0200.00317.50
8.2.180.0270.00718.04
8.2.170.0500.00618.61
8.2.160.0310.01022.96
8.2.150.0070.01124.18
8.2.140.0200.00024.66
8.2.130.0160.00326.16
8.2.120.0290.00419.96
8.2.110.0100.00722.25
8.2.100.0150.00717.84
8.2.90.0140.00019.14
8.2.80.0120.00917.97
8.2.70.0130.00317.63
8.2.60.0090.00618.05
8.2.50.0100.00318.07
8.2.40.0070.00718.28
8.2.30.0030.01018.07
8.2.20.0030.01217.82
8.2.10.0030.00818.10
8.2.00.0110.00317.88
8.1.280.0140.02125.92
8.1.270.0100.00323.97
8.1.260.0110.00426.35
8.1.250.0150.00328.09
8.1.240.0160.00323.87
8.1.230.0180.00619.06
8.1.220.0000.01417.79
8.1.210.0030.00718.77
8.1.200.0120.00317.35
8.1.190.0070.00317.23
8.1.180.0040.00718.10
8.1.170.0070.00318.65
8.1.160.0070.00722.03
8.1.150.0070.00318.98
8.1.140.0030.00717.42
8.1.130.0070.00717.84
8.1.120.0100.00317.46
8.1.110.0070.00717.46
8.1.100.0040.00717.46
8.1.90.0100.00017.51
8.1.80.0130.00017.50
8.1.70.0030.00617.41
8.1.60.0040.00817.65
8.1.50.0120.00417.50
8.1.40.0070.00317.59
8.1.30.0070.00417.71
8.1.20.0030.01317.64
8.1.10.0070.01117.61
8.1.00.0060.00617.52
8.0.300.0070.00418.77
8.0.290.0070.00716.63
8.0.280.0070.00318.50
8.0.270.0030.00617.21
8.0.260.0070.00417.12
8.0.250.0060.00316.82
8.0.240.0080.00416.88
8.0.230.0070.00416.86
8.0.220.0060.00616.73
8.0.210.0030.00716.86
8.0.200.0000.01016.74
8.0.190.0030.00816.70
8.0.180.0100.00316.88
8.0.170.0030.00716.88
8.0.160.0060.00616.67
8.0.150.0100.00016.68
8.0.140.0030.01016.71
8.0.130.0070.00713.26
8.0.120.0040.00716.77
8.0.110.0090.00416.82
8.0.100.0060.00616.81
8.0.90.0000.01016.64
8.0.80.0230.03816.77
8.0.70.0000.01016.67
8.0.60.0040.00816.81
8.0.50.0000.01016.76
8.0.30.0600.02616.78
8.0.20.0290.01817.40
8.0.10.0080.00416.73
8.0.00.0460.02816.64
7.4.330.0190.00015.00
7.4.320.0190.00016.44
7.4.300.0050.01516.37
7.4.290.0000.01116.28
7.4.280.0110.00316.42
7.4.270.0040.00816.34
7.4.260.0080.00816.46
7.4.250.0070.00316.45
7.4.240.0070.00416.35
7.4.230.0030.00716.29
7.4.220.0250.04916.26
7.4.210.0170.01316.27
7.4.200.0100.00316.58
7.4.160.0560.02616.36
7.4.150.0560.04317.40
7.4.140.0450.03517.86
7.4.130.0500.02816.33
7.4.120.0590.02416.35
7.4.110.0490.04616.29
7.4.100.0460.02316.37
7.4.90.0940.02816.32
7.4.80.0480.02119.39
7.4.70.0630.05816.53
7.4.60.0300.03416.62
7.4.50.0150.00016.51
7.4.40.0390.04016.31
7.4.30.0280.03816.61
7.4.00.0220.00614.66
7.3.330.0000.01113.23
7.3.320.0060.00313.31
7.3.310.0060.00316.24
7.3.300.0000.01216.25
7.3.290.0230.02316.29
7.3.280.0180.02216.27
7.3.270.0330.02317.40
7.3.260.0430.04316.47
7.3.250.0360.03416.41
7.3.240.0470.02516.68
7.3.230.0600.01716.59
7.3.210.0460.06816.38
7.3.200.0700.02719.39
7.3.190.0510.03616.33
7.3.180.0400.02816.20
7.3.170.0190.02216.36
7.3.160.0200.01316.39
7.2.330.0500.04116.30
7.2.320.0730.03016.75
7.2.310.0080.02816.40
7.2.300.0350.02216.44
7.2.290.0680.03316.66
7.2.00.0070.01119.30
7.1.100.0160.00518.16
7.1.70.0100.01017.19
7.1.60.0210.02419.40
7.1.50.0250.01617.07
7.0.200.0120.00616.76

preferences:
39.54 ms | 401 KiB | 5 Q