3v4l.org

run code in 200+ 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 - 7.2.0
Array ( [0] => foo )
Output for 5.1.2 - 5.2.0
Strict Standards: Only variables should be passed by reference in /in/7JAou on line 7 Array ( )