Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66622 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55758 invoked from network); 14 Mar 2013 17:28:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2013 17:28:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.82 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.82 blu0-omc2-s7.blu0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [65.55.111.82] ([65.55.111.82:10525] helo=blu0-omc2-s7.blu0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/71-48242-3D802415 for ; Thu, 14 Mar 2013 12:28:52 -0500 Received: from BLU0-SMTP94 ([65.55.111.73]) by blu0-omc2-s7.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 14 Mar 2013 10:28:49 -0700 X-EIP: [AYZmYSF0paKX3yqnKOpgmwrtO4f3ctV/] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from [192.168.178.30] ([78.141.134.76]) by BLU0-SMTP94.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 14 Mar 2013 10:28:47 -0700 Content-Type: text/plain; charset="windows-1252" MIME-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) In-Reply-To: <51420567.8000309@lerdorf.com> Date: Thu, 14 Mar 2013 18:28:44 +0100 CC: PHP Mailing List Developers Content-Transfer-Encoding: quoted-printable References: <51420567.8000309@lerdorf.com> To: Rasmus Lerdorf X-Mailer: Apple Mail (2.1499) X-OriginalArrivalTime: 14 Mar 2013 17:28:47.0474 (UTC) FILETIME=[629C8520:01CE20D9] Subject: Re: [PHP-DEV] feature request : easy shared memory From: bobwei9@hotmail.com (Bob Weinand) Am 14.3.2013 um 18:14 schrieb Rasmus Lerdorf : > 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. >>=20 >> shmop has to be opened on every request and only supports strings. >> APC, memcache,... can only save under serialized form which is slow. >=20 > 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. >=20 > -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=