I believe pass-by-reference is now noted in function definitions ala:
function myFunc(&$myvar) {/* Function */}
whereas in PHP4, you could force pass-by-reference at runtime using:
myFunc(&$myvar);
This was depreciated because parameter definitions should be maintained in
the function definition, not in the function call. Whether a parameter is
pass-by-reference or value should be the same across all calls to maintain
consistency and reduce code (one ampersand instead of many).
- jake
On Nov 19, 2007 1:11 PM, Cliff Hirsch <[EMAIL PROTECTED]> wrote:
> The php manual says:
>
> "In recent versions of PHP you will get a warning saying that "Call-time
> pass-by-reference" is deprecated when you use a & in foo(&$a);"
>
> Why is this? Besides being ugly, difficult to understand and not very
> elegant, is there any reason technical reason why this is deprecated?
>
> Cliff
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php