Jump to content

Pass by reference


novicetillnow

Recommended Posts

Hi,

 

I read in  PHP.net site that "Function definitions alone are enough to correctly pass the argument by reference As of PHP 5.3.0, you will get a warning saying that "call-time pass-by-reference" is deprecated when you use &".

 

Does that mean,

 

function foo(&$var)

foo($a);

 

AND

 

function foo($var)

foo($a);

 

will have same impact? While passing $a, it is treat as Pass by reference by itself???

 

Thanks,

newtocoding

Link to comment
https://forums.phpfreaks.com/topic/171240-pass-by-reference/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.