Let's say we have this function:
<?php
function &collector() {
static $c = array();
return $c;
}
?>
we can use this like the following (very familiar to D7 coders):
<?php
// Note that $x = collector(); won't work.
$x = &collector();
$x[] = 'foo';
?>
Say you wanted to have one line code:
<?php
array_push(&collector(), 'foo');
?>