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 preg_split('/,/' , $a); echo 'ou'; }; foreach (g($a) as $t) { var_dump($t); }
based on OEaUu
Output for hhvm-3.15.4, 7.0.0 - 7.3.0rc3
instring(1) "a" string(1) "b" string(1) "c" string(1) "d" string(1) "e" string(1) "f" ou
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected 'preg_split' (T_STRING) in /in/r6lCE on line 5
Process exited with code 255.