What does "&" mean here in PHP?

php

Solution

From the Passing By Reference docs page:

You can pass a variable by reference to a function so the function can modify the variable. The syntax is as follows:

<?php
function foo(&$var)
{
    $var++;
}

$a=5;
foo($a);
// $a is 6 here
?>

...In recent versions of PHP you will get a warning saying that "call-time pass-by-reference" is deprecated when you use & in foo(&$a);

Problem

Consider this PHP code: ``` call_user_func(array(&$this, 'method_name'), $args); ``` I know it means pass-by-reference when defining functions, but is it when calling a function?

Original source