3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh function foo(int &$foo) { $foo = 346; } $y = vec[1,2,3]; foo($y[2]); var_dump($y);
based on kbkDX
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.8
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/cWYog on line 3
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Vecs cannot contain references' in /in/cWYog:8 Stack trace: #0 {main}
Process exited with code 255.