Re: Argument passed by reference?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe Henry wrote:
On Friday 07 April 2006 5:06 pm, tedd wrote:

At 1:52 PM -0500 4/6/06, Chris Boget wrote:

The way I understand it, pass by reference in php is determined in
the function definition and not the function call. Something like:

You used to be able to pass by reference at run time.  But I see that is
no longer allowed... :|  So I guess that makes my question moot.

Thanks for your help.

thnx,
Chris

Chris:

Please forgive my ignorance, but when did that happen?

I'm not sure when this happened. I'm fairly new to php, myself. Maybe someone else could answer that?


It's not that it's not allowed, it's that it should be done differently. You should make the function accept a reference in the definition, not pass in a reference to the function.

The manual page has a good, simple example on what to do.

http://www.php.net/manual/en/language.references.pass.php

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux