3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { yield 0; yield ['a','b','c'][1]; yield 2; yield 3; yield $element = array('tom','dick','sally','sue')[2]; } try { $o = gen(); foreach($o as $g) { echo $g,' ', empty(boolval($g))? 'false', 'true',"\n"; } } catch (Exception $e) { echo "caught exception"; } finally { echo "Whatever, this line will always run"; }

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)
5.4.110.0030.04316.37
5.4.100.0070.04716.64
5.4.90.0100.06716.53
5.4.80.0070.07716.29
5.4.70.0030.06316.42
5.4.60.0100.05716.31
5.4.50.0070.05316.41
5.4.40.0000.07716.40
5.4.30.0030.04016.43
5.4.20.0070.06016.40
5.4.10.0030.03716.31
5.4.00.0130.05715.71
5.3.210.0070.07314.58
5.3.200.0000.05014.60
5.3.190.0130.04014.59
5.3.180.0030.05314.60
5.3.170.0100.08014.56
5.3.160.0030.06014.57
5.3.150.0070.03714.59
5.3.140.0030.07714.56
5.3.130.0070.07014.61
5.3.120.0130.07314.47
5.3.110.0100.08014.59
5.3.100.0030.04314.03
5.3.90.0100.05714.07
5.3.80.0030.04014.16
5.3.70.0170.03714.07
5.3.60.0170.05714.02
5.3.50.0030.06313.96
5.3.40.0100.06313.98
5.3.30.0070.07013.92
5.3.20.0100.06013.61
5.3.10.0070.06713.70
5.3.00.0070.05713.63

preferences:
150.98 ms | 1394 KiB | 7 Q