Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88481 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60173 invoked from network); 24 Sep 2015 20:34:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2015 20:34:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:37873] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/00-58589-25E54065 for ; Thu, 24 Sep 2015 16:34:26 -0400 Received: by wicfx3 with SMTP id fx3so20642wic.0 for ; Thu, 24 Sep 2015 13:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=iO2Q5fen3CPOTwKWbQMVzZAk069/MoxffqefFwjfMRY=; b=RhodD3xxOtUE0ek1fWQdatm2zkv8NS99qNnp3NNs7CNiEy95ZpE0leknN8rWeQSJCY pNuKahCg+fqb+vS9wW8fdtmaTVRTLfiEZ1sAVWfVc/TP2pIRU/Sb1yQYRk9ooT7/oXmc SGCCzYLunTyNG03olhnDFpdYFCRIynnoej4Eq+dGTIfeggYIL4gKm5gav6diZ8cLan5e brUdrXbLss0lbxiK7nmG3J5fVJAczC3F7lNF8V/0kvreuJa5hv7ZM8r4vR0ZUaYKocZ8 z9fTbM+XH/iX+0QbU0Sc4seVI7CUqx0VKSbSKizSb0FRFH/FW8I1N2CAveC9zbXCz5w9 oZxg== X-Received: by 10.180.106.229 with SMTP id gx5mr12652407wib.24.1443126862212; Thu, 24 Sep 2015 13:34:22 -0700 (PDT) Received: from [192.168.0.5] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by smtp.googlemail.com with ESMTPSA id ki7sm63852wjc.28.2015.09.24.13.34.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2015 13:34:21 -0700 (PDT) To: internals@lists.php.net References: <5601F58A.7000602@php.net> <64233ECB-7422-4D7C-A8A5-E77FC98C09E2@gmail.com> Message-ID: <56045E4C.1040407@gmail.com> Date: Thu, 24 Sep 2015 21:34:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Data serialization of objects, want to iterate 'sealed' properties then dynamic ones From: rowan.collins@gmail.com (Rowan Collins) On 23/09/2015 22:16, j adams wrote: > Not my intention to be combative, but what abouthttp://php.net/pcntl_fork > ? I've used that before in a robust distributed application that runs > without any intervention for months. It's my understanding that PHP is > thread safe, but not itself multithreaded. I believe there are some > extensions which aren't thread safe. Also correct me if I'm wrong but > Apache 2 should be run in it's prefork mode when using PHP. Process forking is very different from multi-threading. Your original question was whether a central object store could cause problems, but as I understand it a forked process shares no memory with its parent, so that's not a problem. The internal thread safety mode ("ZTS") does indeed have to duplicate the object store for each thread, though. The general idea (in Zend Engine 2 / PHP 5, at least) being that a structure is passed around via TSRM* macros and ultimately used by the EG macro in place of a true global: http://lxr.php.net/xref/PHP_5_6/Zend/zend_globals_macros.h#45 All of this is something of an aside from what you really wanted to know, though. :) Regards, -- Rowan Collins [IMSoP]