3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function f() { $key = 1; $value = 1; $data = yield $value; //PHP Parse error: syntax error, unexpected '$value' (T_VARIABLE) in $data = yield $key => $value; //PHP Parse error: syntax error, unexpected '$key' (T_VARIABLE) in array(yield $key => $value); //PHP Parse error: syntax error, unexpected '$key' (T_VARIABLE), expecting ')' } $gen = f();
Output for 7.0.0 - 7.3.0alpha1
Output for 5.6.0 - 5.6.28
Parse error: syntax error, unexpected '$value' (T_VARIABLE) in /in/dCOhe on line 7
Process exited with code 255.