3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 250_000); $b = range(250_000, 500_000); $gen = function(array ...$input):iterable{foreach($input as $it) {yield from $it;}}; $start = microtime(true); foreach($gen($a, $b) as $key => $item){ // } $elapsed = microtime(true) - $start; var_dump($elapsed);
Output for 8.3.3
float(0.02426886558532715)
Output for 8.3.2
float(0.024182796478271484)
Output for 8.3.1
float(0.027235984802246094)
Output for 8.3.0
float(0.027806997299194336)
Output for 8.2.16
float(0.019817829132080078)
Output for 8.2.15
float(0.022126197814941406)
Output for 8.2.14
float(0.018391847610473633)
Output for 8.2.13
float(0.020434141159057617)
Output for 8.2.12
float(0.02377796173095703)
Output for 8.2.11
float(0.021496057510375977)
Output for 8.2.10
float(0.01850414276123047)
Output for 8.2.9
float(0.01867389678955078)
Output for 8.2.8
float(0.018479108810424805)
Output for 8.2.7
float(0.02354288101196289)
Output for 8.2.6
float(0.022233009338378906)
Output for 8.2.5
float(0.01894688606262207)
Output for 8.2.4
float(0.022185087203979492)
Output for 8.2.3
float(0.01868891716003418)
Output for 8.2.2
float(0.018380165100097656)
Output for 8.2.1
float(0.018634796142578125)
Output for 8.2.0
float(0.01858210563659668)
Output for 8.1.27
float(0.018127918243408203)
Output for 8.1.26
float(0.026975154876708984)
Output for 8.1.25
float(0.02760791778564453)
Output for 8.1.24
float(0.01846003532409668)
Output for 8.1.23
float(0.024194955825805664)
Output for 8.1.22
float(0.018102169036865234)
Output for 8.1.21
float(0.018442153930664062)
Output for 8.1.20
float(0.018260955810546875)
Output for 8.1.19
float(0.02035808563232422)
Output for 8.1.18
float(0.018339157104492188)
Output for 8.1.17
float(0.018157005310058594)
Output for 8.1.16
float(0.017817974090576172)
Output for 8.1.15
float(0.0198209285736084)
Output for 8.1.14
float(0.01821303367614746)
Output for 8.1.13
float(0.018058061599731445)
Output for 8.1.12
float(0.01817607879638672)
Output for 8.1.11
float(0.01777505874633789)
Output for 8.1.10
float(0.01850605010986328)
Output for 8.1.9
float(0.021476030349731445)
Output for 8.1.8
float(0.01822805404663086)
Output for 8.1.7
float(0.017802000045776367)
Output for 8.1.6
float(0.018025875091552734)
Output for 8.1.5
float(0.016370773315429688)
Output for 8.1.4
float(0.016871929168701172)
Output for 8.1.3
float(0.020886898040771484)
Output for 8.1.2
float(0.016450881958007812)
Output for 8.1.1
float(0.017158985137939453)
Output for 8.1.0
float(0.01638507843017578)

preferences:
51.82 ms | 470 KiB | 5 Q