Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85633 invoked from network); 4 Aug 2014 17:06:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2014 17:06:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.54 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.54 mail-qa0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:62440] helo=mail-qa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/10-19002-87DBFD35 for ; Mon, 04 Aug 2014 13:06:01 -0400 Received: by mail-qa0-f54.google.com with SMTP id k15so7235178qaq.27 for ; Mon, 04 Aug 2014 10:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8Pu+xhTeUqkOWtsI1kMhxBhAXSFoNGu1sRYUfhKE3hM=; b=K2WNA7yiCrDgyStnR+Ojb35El9xSYY39Z5o+tfkPJlLcwtvDey4uPhi7hUIFN1gpNe zQ50PZWPBF6KO/MkDTABlkK9phhaJabpRJM+sIK/w0SxEr1kBHn2c8PyR+UQeh9phJaj SMh9TGP1jvgt2XjfqHgB4YjTLEsQUz5qjMr6tiA5m2oL/M+H+B1F6CXpLyF9E2Rq1LVp MNKeyn369MM2DJN+pApiOz0hUDN9NLJYxO64x/3KGQ8Q7pjg/cFWOuJJmlifnAXP01PH JjMC2tg7qiAmADioxc3KW+pQ4qQ+AfyXamgh/aZeCkQAaqMb2iHWjSv2ba/CuJCzmkie dy/w== MIME-Version: 1.0 X-Received: by 10.224.127.131 with SMTP id g3mr38890894qas.0.1407171984459; Mon, 04 Aug 2014 10:06:24 -0700 (PDT) Received: by 10.140.24.54 with HTTP; Mon, 4 Aug 2014 10:06:24 -0700 (PDT) In-Reply-To: References: <25.82.08559.C1852D35@pb1.pair.com> <21.50.09748.8007AD35@pb1.pair.com> <53DB525A.4030103@free.fr> Date: Mon, 4 Aug 2014 19:06:24 +0200 Message-ID: To: Dmitry Stogov Cc: Pascal Chevrel , Laruence , PHP Internals , Zeev Suraski , Andrea Faulds , Nikita Popov Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Reporting bugs for phpng From: pierre.php@gmail.com (Pierre Joye) hi Dmitry, On Mon, Aug 4, 2014 at 6:23 PM, Dmitry Stogov wrote: > hi Pascal, > > Laruence is right - immutable arrays are not destroyed until the end of > request and this causes a problem in your case. > > I've committed a partial fix that destroys unnecessary copies when script > is cached by OPCache, but it doesn't work without opcache or when it > doesn't have enough shared memory. > > Disabling immutable arrays for top-level code looks as a too pessimistic > decision. Most apps have their configuration arrays in top-level code and > only few might be affected by this problem... > > I think, we may introduce new pragma that might enable/disable immutable > array creation during compilation. > So applications that use a lot of big arrays may modify the default > behaviour for some files. > > e.g. > > declare(immutable_arrays=>'off'); > $a = array(...); > ?> > > Thoughts? As I agree that a solution has to be found, introducing pragma is definitively not something I like to see in PHP, options like that are way too low level and should not be exposed in userland. It will make PHP way too complex. Cheers, Pierre