Re: [PECL-DEV] Re: shared memory extention
[email protected] (Geoffrey McRae) Fri, 16 Apr 2010 08:39:20 +1000
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <[email protected]> |
If that's the case then how are is ref values handled? Everything I read says that php does copy on write, so two values can point to the same block of data. Can someone please clear this up for me. Thanks Kind Regards Geoffrey McRae http://www.spacevs.com On 16/04/2010, at 7:29 AM, Stanislav Malyshev <[email protected]> wrote: > Hi! > >> Or even better yet, is there a way to compare two zval's and see if >> they >> are pointing to the the same data? > > Two different zvals shouldn't be pointing to the same data unless > they're objects, in which case they'd have same handler table and > object ID values. > > You may want to look at serialization code in ext/standard/var.c for > an example of how you deal with references when serializing. > -- > Stanislav Malyshev, Zend Software Architect > [email protected] http://www.zend.com/ > (408)253-8829 MSN: [email protected]