Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69113 invoked from network); 21 Jun 2018 14:08:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2018 14:08:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.173 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 74.125.82.173 mail-ot0-f173.google.com Received: from [74.125.82.173] ([74.125.82.173:41749] helo=mail-ot0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/AF-32156-061BB2B5 for ; Thu, 21 Jun 2018 10:08:33 -0400 Received: by mail-ot0-f173.google.com with SMTP id d19-v6so3704018oti.8 for ; Thu, 21 Jun 2018 07:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=N/H6gXF531FoNBfw+tsab5ZN8CAXTB1Vj3fh+qx4khQ=; b=O88Gizq0ls3MrYWiQtZyT1cDxu8wDjN4ty4zaCU+DtREeEYxj0zLAialXsthmiA9aD sp38+cu6prsL/zUW2kibsa9jmxSNVroi3xi+/suP6FDyakT5fdQiOcQg9fXCc6ONRpNl foGQr9Mrfcyx4Gn3uk1wm2cuFwlpPUdtcl6tIFLELxE7VtGO75HbipGTbK/YYWOqiekW ADm/CcZNRikIhQkExj2QVtbNwUi0/DzO5vREDui82EDx91eE/f7gTO38dULf5Wh1Y3cZ qfxutdpetCpG2Xs6vfmTbZwLXRv9Ts2Sa4omD3Jy3WaJWbR0TR7E0WdZtmvAZE1trcdE MVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=N/H6gXF531FoNBfw+tsab5ZN8CAXTB1Vj3fh+qx4khQ=; b=n6MMQVR5rMfxvcGn6RhfLQuYzkVg85aoeDAnAm85pWKE7BUJGdaZVudyWSoyeTOw8A dbYinTfVtBKb/1OOoGI3gcMyKiOPkj3y+ANzwoB07qc2/Hm4swO4pGousziR6GUECaSu BuOOrig7oo798StkCMT/BJQvJRMAOGlWZIgoMPWIDPmLaTami8x1ev2Uqv8fkQFg5TT4 YVo/JomPaQXktDLRSArMF93WtOoVM2B13i/ZEJvD5+Z7pMh7txGG4EivkcJ1ZsQCUk/d Hb5PzpXwbS29/9s1OFlYMkIXSSora659Y7pRqD1Jm+nGA37LBU3VOXF02BeK3iIw8Dm9 sAYw== X-Gm-Message-State: APt69E3SRc8NqrGU6wG6dw+d5Rk0tpGQQjvRY553PxocscbdUUMRXYQa JoyVgo2vg9jUkyy/wmfI6fO62K/EuqXIVo1KyS4= X-Google-Smtp-Source: ADUXVKJUMhV1COccgpPhYLoPyK+xPvgh9K/HwG88Vy/ewkW4y2WBKJMghtQAHNLuQTtQQUGsWlaLFfwdafeP1xgFPnM= X-Received: by 2002:a9d:36ca:: with SMTP id s10-v6mr7464344otd.352.1529590110059; Thu, 21 Jun 2018 07:08:30 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 2002:a4a:8b28:0:0:0:0:0 with HTTP; Thu, 21 Jun 2018 07:08:09 -0700 (PDT) In-Reply-To: References: Date: Thu, 21 Jun 2018 16:08:09 +0200 X-Google-Sender-Auth: vQB7zggucPgSORQJ8X-3rjWx7LM Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000002980b5056f2773dc" Subject: Re: [PHP-DEV] [RFC] Typed Properties From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000002980b5056f2773dc Content-Type: text/plain; charset="UTF-8" Hi Nikita, Bob, https://wiki.php.net/rfc/typed_properties_v2 > This is really well thought and written, sounds really primising. I agree that "References without intrinsic type" look the best. I anticipate one case on Symfony VarDumper that will break on typed references: the only way to detect references is by injecting cookies in arrays, e.g.: $a = (array) $someObjectOrArray; $cookie = new stdClass(); $b = $a; $b[$k] = $cookie; if ($a[$k] === $cookie) { // Here we have a reference } I'd need to wrap the assignation in a try/catch now: try { $b[$k] = $cookie; } catch (TypeError $e) { // Here we have a typed reference that doesn't accept stdclass } So far so good I suppose. I just wanted to raise the point if it matters at all. Thank you, Nicolas --0000000000002980b5056f2773dc--