3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (($ver = phpversion()) != '5.5.0beta4') die($ver); function getArticle () { $article = (yield (yield "Article 1"); yield $article; } function fce() { return 150; } $d = getArticle(); foreach ($d as $key => $val) { echo "$key: $val\n"; }
Output for 5.4.16
Parse error: syntax error, unexpected '"Article 1"' (T_CONSTANT_ENCAPSED_STRING) in /in/UHRj6 on line 6
Process exited with code 255.
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '"Article 1"' (T_CONSTANT_ENCAPSED_STRING) in hLBBK on line 6
Process exited with code 255.
Output for 5.3.25 - 5.3.26
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/UHRj6 on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in hLBBK on line 6
Process exited with code 255.