NYCPHP Meetup

NYPHP.org

[nycphp-talk] Copy-on-write

Analysis & Solutions danielc at analysisandsolutions.com
Fri Oct 31 14:00:54 EST 2003


Hi George:

On Thu, Oct 30, 2003 at 09:15:30PM -0500, George Webb wrote:
> 
> Does this also hold true for values *returned* from functions?

I'm going to venture a guess as to what's going on.  I hope someone with 
more knowledge on the subject will corroborate or correct what I'm about 
to say...

The idea of returning from functions is different than sending data to 
functions.

Most functions return static values.  You can put that value into a
variable.  If you alter that variable, you're altering THAT value.  I
don't think PHP's going to be making a copy because there's no need to
remember the old value returned by the function.

Pardon me while I skip over explaining the whole "return by reference" 
issue.

See you,

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list