3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'a,b,c,d,e,f'; function g($a) { echo 'in'; yield preg_split('/,/' , $a); echo 'ou'; }; foreach (g($a) as $t) { var_dump($t); }
based on nOHRd
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
inarray(6) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" [4]=> string(1) "e" [5]=> string(1) "f" } ou