3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test() { $ret = yield; echo $ret; } $val = test(); echo $val->send('xuy');
Output for 5.5.0 - 7.1.0
xuy
Output for 5.0.0 - 5.4.45
Notice: Use of undefined constant yield - assumed 'yield' in /in/SlUpl on line 5 yield Fatal error: Call to a member function send() on a non-object in /in/SlUpl on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Use of undefined constant yield - assumed 'yield' in /in/SlUpl on line 5 yield Fatal error: Call to a member function on a non-object in /in/SlUpl on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant yield - assumed 'yield' in /in/SlUpl on line 5 yield Fatal error: Call to a member function on a non-object in /in/SlUpl on line 10