Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58938 invoked from network); 22 Feb 2017 14:01:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2017 14:01:57 -0000 Authentication-Results: pb1.pair.com header.from=come@opensides.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=come@opensides.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain opensides.be designates 195.154.20.141 as permitted sender) X-PHP-List-Original-Sender: come@opensides.be X-Host-Fingerprint: 195.154.20.141 smtp.opensides.be Received: from [195.154.20.141] ([195.154.20.141:50348] helo=smtp.opensides.be) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/55-11648-3D99DA85 for ; Wed, 22 Feb 2017 09:01:56 -0500 Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id DF37E10D4E1 for ; Wed, 22 Feb 2017 15:01:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at opensides.be Received: from smtp.opensides.be ([127.0.0.1]) by localhost (smtp.opensides.be [127.0.0.1]) (amavisd-new, port 10024) with LMTP id K3YMatSKVwhM for ; Wed, 22 Feb 2017 15:01:52 +0100 (CET) Received: from mcmic-probook.localnet (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.opensides.be (Postfix) with ESMTPSA id 2903C10D4D7 for ; Wed, 22 Feb 2017 15:01:52 +0100 (CET) To: internals@lists.php.net Date: Wed, 22 Feb 2017 15:01:46 +0100 Message-ID: <13777322.eOKPzv5dy0@mcmic-probook> Organization: OpenSides User-Agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: References in the session From: come@opensides.be (=?ISO-8859-1?Q?C=F4me?= Chilliet) Hello, In the $_SESSION documentation we can see the following warning: "You c= an't use references in session variables as there is no feasible way to= restore a reference to another variable." In our application, references where stored in the session and it *seem= ed to* work fine under PHP5, and it broke with PHP7. I removed as much references uses as possible, but it=E2=80=99s sometim= es hard to guess which objects will end up in the session or not in a c= omplex application. So, what would help me would be if PHP emit a warning when my code trie= s to store a reference in the session. Because right now, it silently fails and I get random errors later when= using objects restored from the session. Is it possible to get such a warning? If not, is it something that could/should be added? Silent failing is always a bad option in my opinion. C=C3=B4me