3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function from1251($a) { return $a; } function foo() { yield from1251('df'); } foreach(foo() as $bar) { var_dump($bar); }
based on LsNhq
Output for 7.0.0 - 7.1.3
Parse error: syntax error, unexpected '(' in /in/gl97e on line 10
Process exited with code 255.
Output for hhvm-3.12.14 - 3.17.3
Fatal error: Uncaught Error: Function name must be a string in /in/gl97e:10 Stack trace: #0 (): foo() #1 /in/gl97e(15): Generator->rewind() #2 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
string(2) "df"