Description
Category:
Deprecated Functionality
Call-time pass-by-reference has been deprecated in more recent versions of PHP. Instead of specifying the & prefix in the function call, use it in the function declaration instead.
Example
Deprecated
function
increment
(
$n
)
{
$n
++;
}
$foo
=
5
;
increment
(&
$foo
);
Correct
function
increment
(&
$n
)
{
$n
++;
}
$foo
=
5
;
increment
(
$foo
);