Am 14.3.2013 um 18:14 schrieb Rasmus Lerdorf <ras...@lerdorf.com>: > On 03/14/2013 09:13 AM, Bob Weinand wrote: >> And there is no possibility to store the zval as raw binary data like in >> memory (deep copy?) >> So that you only have to copy from ram? And replace the pointers to the >> place in the string? >> This must be possible I think. And should be faster. >> >> shmop has to be opened on every request and only supports strings. >> APC, memcache,... can only save under serialized form which is slow. > > APC doesn't serialize most types. Only actual objects need to be > serialized because it is the easiest way to fully save and restore > objects. eg. calling their __sleep()/__wakeup() magic methods, etc. > Arrays are not serialized. > > -Rasmus
Thanks, ..., okay, didn't know that. But even now I am in favor of a new keyword as it will be easier to have a reference to the shared memory (written in and reread from memory when modified) than every time refetching it when the shared memory block may have changed in an other program (what could really reduce race-conditions implicitly as as a developer you may forget to refetch the variable from shared memory). Yes, refetching always is already possible with an userland getter/setter, but I don't think it's best practice to do so in PHP... Bob Weinand -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php