3v4l.org

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