3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function printer() { yield; } $printer = printer(); foreach($printer as $v) { var_dump($v); }
based on Q52rD
Output for 5.5.24 - 7.1.0
NULL
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.4.45
Notice: Use of undefined constant yield - assumed 'yield' in /in/mHBbX on line 3 Warning: Invalid argument supplied for foreach() in /in/mHBbX on line 8
Output for 4.3.11
Notice: Use of undefined constant yield - assumed 'yield' in /in/mHBbX on line 3