Objects and functions already are refs, and you can pass arrays by ref using link().
PHP Code:
function onCreated() {
temp.array = {"lol", "pancake"};
thefunc(temp.array.link());
}
function thefunc(array) {
array[1] @= "lol";
}
Though I think its silly that it only works for arrays and not strings or numbers.