When PHP copies an object is it using a simple malloc and memcpy ?

From: Date: Wed, 20 Jun 2001 10:27:35 +0000
Subject: When PHP copies an object is it using a simple malloc and memcpy ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-57360@lists.php.net to get a copy of this message
Not sure where to post this question, I don't think the PHP general list is the right place. I have a large result set from a database. In effect, it is a large 2 dimensional array. If I pass this to a method by value it gets copied into the local scope of that method. The copy is a different physical copy. My question is how efficient is this? I suspect that PHP would just call a malloc() and memcpy(), so the overhead shouldn't be too huge. Or am I mistaken and a lot of extra overhead is involved for the parser to manage the copy. Thanks in advance Neil Kimber

« previous php.dev (#57360) next »