3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test($arg) { echo 1; echo $arg; yield; echo 2; echo $arg; } test('A'); test('B');
based on o5tv0
Output for 5.5.24 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Output for 4.3.0 - 5.4.45
1A Notice: Use of undefined constant yield - assumed 'yield' in /in/Wrql0 on line 7 2A1B Notice: Use of undefined constant yield - assumed 'yield' in /in/Wrql0 on line 7 2B