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 from ['a,b,c,d,e,f'] /*preg_split('/,/' , $a)*/; echo 'ou'; }; foreach (g($a) as $t) { var_dump($t); }
based on r6lCE
Output for hhvm-3.15.4, 7.0.0 - 7.3.0rc3
instring(11) "a,b,c,d,e,f" ou
Output for 5.6.0 - 5.6.30
in Notice: Use of undefined constant from - assumed 'from' in /in/3857G on line 5 Warning: Illegal string offset 'a,b,c,d,e,f' in /in/3857G on line 5 string(1) "f" ou