3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); namespace App; use Generator; use CachingIterator; $generator = /** * @return Generator<bool, bool> */ static function (): Generator { yield true => true; yield false => false; }; $iterator = new CachingIterator($generator()); foreach ($iterator as $k => $v) { var_dump($k, $v); } foreach ($iterator->getCache() as $k => $v) { var_dump($k, $v); }

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.0080.00016.72
8.3.120.0070.01318.76
8.3.110.0090.00020.94
8.3.100.0040.01124.06
8.3.90.0060.01326.77
8.3.80.0080.00318.16
8.3.70.0150.00016.63
8.3.60.0040.01818.43
8.3.50.0000.01420.34
8.3.40.0150.00322.08
8.3.30.0150.00018.70
8.3.20.0050.00324.18
8.3.10.0050.00324.66
8.3.00.0000.00826.16
8.2.250.0030.00616.61
8.2.240.0130.00719.11
8.2.230.0080.00022.58
8.2.220.0030.00737.54
8.2.210.0000.00826.77
8.2.200.0060.00316.75
8.2.190.0070.01016.88
8.2.180.0110.00425.92
8.2.170.0130.00318.86
8.2.160.0110.00422.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0070.00026.16
8.2.110.0000.01020.91
8.2.100.0090.00317.97
8.2.90.0040.00418.22
8.2.80.0080.00019.15
8.2.70.0000.00817.63
8.2.60.0000.00817.63
8.2.50.0080.00017.98
8.2.40.0030.00518.28
8.2.30.0050.00318.21
8.2.20.0000.00820.42
8.2.10.0000.00718.06
8.2.00.0000.00719.12
8.1.300.0150.00020.37
8.1.290.0060.00330.84
8.1.280.0140.00725.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00023.84
8.1.230.0040.00722.70
8.1.220.0000.00717.77
8.1.210.0030.00620.48
8.1.200.0090.00017.48
8.1.190.0050.00317.35
8.1.180.0090.00318.10
8.1.170.0000.00817.62
8.1.160.0060.00318.89
8.1.150.0070.00018.64
8.1.140.0040.00417.46
8.1.130.0030.00318.77
8.1.120.0050.00217.50
8.1.110.0000.00717.41
8.1.100.0080.00017.50
8.1.90.0040.00317.46
8.1.80.0110.00017.33
8.1.70.0110.00417.47
8.1.60.0050.00517.50
8.1.50.0090.00317.40
8.1.40.0060.00617.44
8.1.30.0130.00017.49
8.1.20.0100.00717.50
8.1.10.0180.00017.61
8.1.00.0160.00317.47
8.0.300.0040.00420.12
8.0.290.0030.00616.88
8.0.280.0030.00318.32
8.0.270.0000.00716.81
8.0.260.0000.00618.52
8.0.250.0030.00317.07
8.0.240.0000.00817.02
8.0.230.0030.00316.88
8.0.220.0000.00716.89
8.0.210.0080.00016.94
8.0.200.0130.00216.99
8.0.190.0080.00816.96
8.0.180.0080.00816.86
8.0.170.0120.00316.76
8.0.160.0150.00016.95
8.0.150.0100.00616.76
8.0.140.0100.00716.77
8.0.130.0050.01116.81
8.0.120.0110.00416.86
8.0.110.0140.00016.89
8.0.100.0120.00316.88
8.0.90.0100.00516.92
8.0.80.0080.00816.86
8.0.70.0130.00316.88
8.0.60.0160.00016.99
8.0.50.0040.01216.75
8.0.30.0150.00016.75
8.0.20.0110.00516.94
8.0.10.0160.00017.07
7.4.330.0030.00315.55
7.4.320.0030.00316.49
7.4.300.0140.00316.41
7.4.290.0150.00016.49
7.4.280.0050.01016.60
7.4.270.0130.00016.56
7.4.260.0110.00416.44
7.4.250.0140.00416.42
7.4.240.0180.00016.52
7.4.230.0110.00416.59
7.4.220.0120.00416.50
7.4.210.0110.00416.40
7.4.200.0120.00316.60
7.4.190.0110.00416.66
7.4.180.0130.00316.65
7.4.160.0120.00316.55
7.4.150.0150.00016.58
7.4.140.0110.00416.32
7.4.130.0150.00016.49
7.4.120.0110.00416.53
7.4.110.0120.00316.45
7.4.100.0120.00316.43
7.4.90.0100.00616.43
7.4.80.0150.00516.30
7.4.70.0150.00016.53
7.4.60.0100.00516.48
7.4.50.0070.00916.30
7.4.40.0110.00416.23
7.4.30.0110.00416.43
7.4.20.0110.00416.39
7.4.10.0040.00816.45
7.4.00.0060.00316.42

preferences:
26.83 ms | 403 KiB | 5 Q