On Thu, July 27, 2006 1:05 pm, Adam Zey wrote:
Then how come when I do a foreach on an array (without modifying
anything within the foreach), it still makes a copy of the array that
consumes memory? I think it's dangerous to generalize that it's always
best to let PHP make copies of things. In
On Thu, 2006-07-27 at 01:35, Larry Garfield wrote:
On Wednesday 26 July 2006 21:41, Robert Cummings wrote:
I'm working on some code that would be called to generate a cell in a
possibly large table and therefore a small difference in performance
may have a significant impact.
PHP
Robert Cummings wrote:
On Thu, 2006-07-27 at 01:35, Larry Garfield wrote:
On Wednesday 26 July 2006 21:41, Robert Cummings wrote:
I'm working on some code that would be called to generate a cell in a
possibly large table and therefore a small difference in performance
may have a significant
Robert Cummings wrote:
Then how come when I do a foreach on an array (without modifying
anything within the foreach), it still makes a copy of the array that
consumes memory? I think it's dangerous to generalize that it's always
best to let PHP make copies of things. In the foreach situation,
KermodeBear wrote:
Robert Cummings wrote:
Then how come when I do a foreach on an array (without modifying
anything within the foreach), it still makes a copy of the array that
consumes memory? I think it's dangerous to generalize that it's always
best to let PHP make copies of things. In
On Thu, 2006-07-27 at 14:48, Adam Zey wrote:
KermodeBear wrote:
Robert Cummings wrote:
Then how come when I do a foreach on an array (without modifying
anything within the foreach), it still makes a copy of the array that
consumes memory? I think it's dangerous to generalize that
On Wed, 2006-07-26 at 22:29, Michael B Allen wrote:
Is a function return value copied? If the value is an integer I suppose
it is but what about a string or an array? If you pass by reference is
the return value still copied?
For example, is this:
function foo($arr) {
$arr[] =
On Wednesday 26 July 2006 21:41, Robert Cummings wrote:
I'm working on some code that would be called to generate a cell in a
possibly large table and therefore a small difference in performance
may have a significant impact.
PHP uses copy-on-write and so copies are essentially shared
8 matches
Mail list logo