3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh function foo() { $var = "I'm a string"; var_dump($var); $v = Vector{'($var = 1234) || true'}; $v->map('assert'); var_dump($var); } foo();
based on Mkv1X
Output for 5.4.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/HfsLb on line 3
Process exited with code 255.
Output for hhvm-3.10.1 - 3.17.3
string(12) "I'm a string" string(12) "I'm a string"
Output for 4.3.0 - 5.3.29
<?hh function foo() { $var = "I'm a string"; var_dump($var); $v = Vector{'($var = 1234) || true'}; $v->map('assert'); var_dump($var); } foo();