Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100085 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78244 invoked from network); 28 Jul 2017 14:48:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2017 14:48:45 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.50 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.50 mail-oi0-f50.google.com Received: from [209.85.218.50] ([209.85.218.50:35421] helo=mail-oi0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/56-40376-DCE4B795 for ; Fri, 28 Jul 2017 10:48:45 -0400 Received: by mail-oi0-f50.google.com with SMTP id e124so174830082oig.2 for ; Fri, 28 Jul 2017 07:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2bZ6O+Izapd97Z3TxKJ7J8gDAZOsRFeZZO71ZcfLFlw=; b=unlR8UyqZwWXWQoa3EY0OzhylsVaNshamDrvurvKVZMmdVQTvTOMGUF3tizgca84SQ HMk0ibuqzNUbnOu0KaEJU51bt8tLOWfwb2b19oFPdSAjiB7EEkGq5kGt763ZsdrgYnEB /LhmPMBoeznY72gB9cr0tAqtXiUYJHSW8f4WU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2bZ6O+Izapd97Z3TxKJ7J8gDAZOsRFeZZO71ZcfLFlw=; b=T6jIpW9xKwDlGerU36PVMW74VavMkclpJaaDSwCqG2ppSCUMRWuI+LrvECVzI7yz7A 7FVpcTmVYYmXMPwQw5JnoVH8aIFGUywG+6xWyhzePliBWTSI0cpSTV2IGXgBNYOeKOqv +HVWo1QDy7OL/9t+NhzqIJT/MilFozlmmmLHDQGdJ9+W5LcYdp2iWYZBQlJYrtVlTPBV XaMx/7U0VCJeIQ3Iiiysl/crUC7Yf7tcmNMSxzuxVaJl7lUSEuYaYMOrT7QbKMg0LU1l FEsLiRQVJIl+3ZykGorA32newmPIxNTE5nN01immW5uYnskeJVOAIOSmzPS2b7gbm87o kyDA== X-Gm-Message-State: AIVw113xQZmwr8Be+fZYT8LMtYDiX8sWvbA6YHeEm21c87lXuVk3nGMr 4jksiO8Gb+ZfKcL0S/KsCwKqtaLzEN++ X-Received: by 10.202.215.130 with SMTP id o124mr6491071oig.204.1501253322577; Fri, 28 Jul 2017 07:48:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.115.69 with HTTP; Fri, 28 Jul 2017 07:48:41 -0700 (PDT) In-Reply-To: References: <28093140-0D0D-4157-AAA3-E8F1A570E67A@gmail.com> <422D7E05-864E-40EB-AEEB-81DFED80CA72@gmail.com> Date: Fri, 28 Jul 2017 17:48:41 +0300 Message-ID: To: Sara Golemon Cc: Rowan Collins , PHP internals , "lists@rhsoft.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] session_start() should not reset $_SESSIOn if it's not empty From: narf@devilix.net (Andrey Andreev) Hi, On Fri, Jul 28, 2017 at 5:45 PM, Sara Golemon wrote: > > ftr; I'd vote in favor of several BC breaking things to do with > autoglobals, among them: > > * Make them objects (though ArrayAccess based for less hostile BC breakage) > * Make most of them read-only (offsetGet(), but no offsetSet) > * Make $_SESSION[...] access produce an error or auto-start the session > > I've seen too many codebases abuse GPCER vars as a generic storage > location because "globals are bad, but this is good because it doesn't > include the word global". As a performance issue, the runtime has to > assume autoglobals are inherently volatile and could change on a whim > at any moment (much like $http_response_headers). Restricting their > mutability would be a win. The request globals could probably also be > optimized fairly significantly. > > If anyone agrees, I'm willing to RFC it. If not, I'll continue living > with it. :D > Yes, please!