3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test () { $data = yield; echo $data; } $d = test(); $d->send('something'); $d->send('something2');
Output for 5.5.0 - 7.1.0
something
Output for 5.2.3 - 5.4.45
yield Fatal error: Call to a member function send() on a non-object in /in/X9EMZ on line 10
Process exited with code 255.
Output for 5.0.0 - 5.2.2
yield<br /> <b>Fatal error</b>: Call to a member function send() on a non-object in <b>/in/X9EMZ</b> on line <b>10</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.9
yield<br /> <b>Fatal error</b>: Call to a member function on a non-object in <b>/in/X9EMZ</b> on line <b>10</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
yield<br /> <b>Fatal error</b>: Call to a member function on a non-object in <b>/in/X9EMZ</b> on line <b>10</b><br />