3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (($ver = phpversion()) != '5.5.0beta4') die($ver); function getArticle () { $article = yield fce(); yield $article; } function fce() { return 150; } $d = getArticle(); $d->send('something'); $d->send('something2');
Output for 7.1.0
7.1.0
Output for 7.0.14
7.0.14
Output for 7.0.8
7.0.8
Output for 7.0.7
7.0.7
Output for 7.0.6
7.0.6
Output for 7.0.5
7.0.5
Output for 7.0.4
7.0.4
Output for 7.0.3
7.0.3
Output for 7.0.2
7.0.2
Output for 7.0.1
7.0.1
Output for 7.0.0
7.0.0
Output for hhvm-3.10.0 - 3.12.0
5.6.99-hhvm
Output for 5.4.0 - 5.6.28
Parse error: syntax error, unexpected 'fce' (T_STRING) in /in/BC6D8 on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/BC6D8 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/BC6D8 on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/BC6D8 on line 6
Process exited with code 255.