3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function &collector() { static $collection = array(); return $collection; } array_push(collector(), 'foo'); print_r(collector());
Output for 4.3.0 - 5.1.1, 5.2.1 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => foo )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.2 - 5.2.0
Strict Standards: Only variables should be passed by reference in /in/7JAou on line 7 Array ( )