Re: [PHP] Return value efficiency question

2004-03-10 Thread trlists
On 10 Mar 2004 Robert Cummings wrote: Overhead is minimal since PHP doesn't actually copy the contents of the container until an attempt to modify it is made. At which time the contents are only actually copied if the internal reference count is greater than 0. Generally this means it won't

Re: [PHP] Return value efficiency question

2004-03-10 Thread Burhan Khalid
Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful, and false otherwise? [ trimmed ] -- PHP General Mailing List

RE: [PHP] Return value efficiency question

2004-03-10 Thread Ford, Mike [LSS]
On 10 March 2004 13:48, Burhan Khalid wrote: Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful, and false

Re: [PHP] Return value efficiency question

2004-03-10 Thread messju mohr
On Wed, Mar 10, 2004 at 04:48:06PM +0300, Burhan Khalid wrote: Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful,

Re: [PHP] Return value efficiency question

2004-03-10 Thread Robert Cummings
On Wed, 2004-03-10 at 08:30, [EMAIL PROTECTED] wrote: On 10 Mar 2004 Robert Cummings wrote: Overhead is minimal since PHP doesn't actually copy the contents of the container until an attempt to modify it is made. At which time the contents are only actually copied if the internal

[PHP] Return value efficiency question

2004-03-09 Thread Kelly Hallman
Consider this method: function xyz() { return $this-data = unserialize($this-serial); } A few assumptions: - Resultant data large enough to warrant discussion of efficiency - I always want to store the unserialized data into the object - The return value is only needed sometimes If

Re: [PHP] Return value efficiency question

2004-03-09 Thread Robert Cummings
On Wed, 2004-03-10 at 02:07, Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } A few assumptions: - Resultant data large enough to warrant discussion of efficiency - I always want to store the unserialized data into