3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Rick { public static function say(string ...$words) { foreach($words as $word) { yield($word); } } } echo Rick::say('wubba','lubba','dub','dub');
based on Y8QS2
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class Generator could not be converted to string in /in/3qAGe on line 10
Process exited with code 255.
Output for 5.6.8 - 7.0.20
Catchable fatal error: Object of class Generator could not be converted to string in /in/3qAGe on line 10
Process exited with code 255.
Output for 5.4.11 - 5.5.35
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /in/3qAGe on line 3
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '.', expecting '&' or T_VARIABLE in /in/3qAGe on line 3
Process exited with code 255.