3v4l.org

run code in 300+ PHP versions simultaneously
<?php class It implements \IteratorAggregate { public $gen; public function getIterator(): \Generator { yield 'foo'; $this->gen->throw(new Exception()); var_dump("not executed"); } public function __destruct() { var_dump(__METHOD__); } } function f($it) { try { var_dump(new stdClass, yield from $it); } finally { var_dump(__FUNCTION__); } } $it = new It(); $gen = f($it); $it->gen = $gen; var_dump($gen->current()); $gen->next(); gc_collect_cycles(); ?>

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.5.10.0110.00716.93
8.5.00.0120.01021.82
8.4.150.0020.00014.05
8.4.140.0090.01218.00
8.4.130.0120.00918.02
8.4.120.0130.00720.65
8.4.110.0130.00718.55
8.4.100.0180.00117.77
8.4.90.0100.00820.49
8.4.80.0030.00518.94
8.4.70.0140.00420.56
8.4.60.0120.00618.88
8.4.50.0040.00323.84
8.4.40.0150.00617.47
8.4.30.0180.00020.78
8.4.20.0140.00419.73
8.4.10.0030.00519.65
8.3.280.0170.00718.50
8.3.270.0110.00916.54
8.3.260.0130.00716.71
8.3.250.0100.00918.95
8.3.240.0150.00416.63
8.3.230.0040.00517.09
8.3.220.0130.00519.09
8.3.210.0020.00518.73
8.3.200.0120.00716.61
8.3.190.0050.00317.11
8.3.180.0110.00918.94
8.3.170.0090.00919.14
8.3.160.0090.00920.55
8.3.150.0160.00316.83
8.3.140.0160.00017.41
8.3.130.0000.00818.70
8.3.120.0040.01519.06
8.3.110.0060.01218.48
8.3.100.0330.01737.54
8.3.90.0260.02037.54
8.3.80.0470.00737.54
8.3.70.0310.01237.54
8.3.60.0330.01537.54
8.3.50.0420.00837.54
8.3.40.0390.01137.54
8.3.30.0410.00737.54
8.3.20.0330.01037.54
8.3.10.0360.00937.54
8.3.00.0200.00037.54
8.2.290.0120.00816.68
8.2.280.0110.00818.55
8.2.270.0120.00616.86
8.2.260.0040.00416.79
8.2.250.0080.00018.40
8.2.240.0090.00020.84
8.2.230.0000.00820.94
8.2.220.0110.00737.54
8.2.210.0140.00337.54
8.2.200.0120.00637.54
8.2.190.0250.00037.54
8.2.180.0190.00437.54
8.2.170.0230.01737.54
8.2.160.0350.00737.54
8.2.150.0330.00337.54
8.2.140.0400.00337.54
8.2.130.0360.00737.54
8.2.120.0330.01037.54
8.2.110.0340.00937.54
8.2.100.0410.00037.54
8.2.90.0300.01237.54
8.2.80.0340.00737.54
8.2.70.0390.00337.54
8.2.60.0350.00737.54
8.2.50.0380.00337.54
8.2.40.0340.00337.54
8.2.30.0320.00737.54
8.2.20.0330.00637.54
8.2.10.0350.00437.54
8.2.00.0350.00437.54
8.1.330.0140.00416.09
8.1.320.0140.00518.00
8.1.310.0090.00016.12
8.1.300.0090.00016.20
8.1.290.0310.00737.54
8.1.280.0320.01037.54
8.1.270.0270.00837.54
8.1.260.0230.00037.54
8.1.250.0120.00837.54
8.1.240.0290.00737.54
8.1.230.0250.01337.54
8.1.220.0260.00937.54
8.1.210.0170.01437.54
8.1.200.0310.00337.54
8.1.190.0310.00337.54
8.1.180.0380.00337.54
8.1.170.0250.00937.54
8.1.160.0250.00737.54
8.1.150.0250.00937.54
8.1.140.0240.01037.54
8.1.130.0300.00837.54
8.1.120.0300.00837.54
8.1.110.0350.00337.54
8.1.100.0250.01237.54
8.1.90.0340.00437.54
8.1.80.0250.01337.54
8.1.70.0240.01637.54
8.1.60.0350.00637.54
8.1.50.0350.01037.54
8.1.40.0310.01237.54
8.1.30.0380.00637.54
8.1.20.0410.00037.54
8.1.10.0230.01037.54
8.1.00.0260.01537.54

preferences:
76.56 ms | 403 KiB | 5 Q