3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getArray() { return [1, 2, 3]; } function squareArray(array &$a) { foreach ($a as &$v) { $v **= 2; } } // Generates a warning in PHP 7. squareArray((getArray()));
Output for 7.0.0 - 7.1.7
Notice: Only variables should be passed by reference in /in/HYONN on line 14
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3