PHP Warning: “call-time pass-by-reference” is deprecated

when calling a depreciated function in php file generates call-time pass-by-reference warning, well if you set allow_call_time_pass_reference to true in your php.ini it will go away.
Also remember function definitions alone are enough to correctly pass the argument by reference as
function foo(&$var)
{
$var++;
}
$a=5;
foo($a);
// $a is 6 here
?>
Note: There is no reference sign on a function call – only on function definitions
As of PHP 5.3.0, you will get a warning saying that “call-time pass-by-reference” is deprecated when you use & in foo(&$a);

Comments

Popular posts from this blog

PHP / SQL Security – The Big Picture

PHP / SQL Security – SQL Commands and Non-String Variables

Top 50 Web Hacking Techniques