3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test() { $data = yield; echo $data; } $d = test(); var_dump($d);
Output for 5.5.0 - 7.1.0
object(Generator)#1 (0) { }
Output for 4.3.0 - 5.4.45
Notice: Use of undefined constant yield - assumed 'yield' in /in/Thb8D on line 5 yieldNULL