1

php manual states

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);. And as of PHP 5.4.0, call-time pass-by-reference was removed, so using it will raise a fatal error.

why has the PHP team decided to do this? has there been any disadvantage by enabling pass by reference in previous releases? what factor has motivated for this decision?

DesirePRG
  • 6,122
  • 15
  • 69
  • 114
  • 1
    Check this one - http://stackoverflow.com/questions/18046846/why-is-function-call-by-reference-in-php-deprecated – prava Mar 16 '15 at 06:39
  • 2
    *call-time* pass-by-reference is deprecated, not pass-by-reference itself. – jeroen Mar 16 '15 at 06:43

0 Answers0