Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96575 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12642 invoked from network); 24 Oct 2016 05:24:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2016 05:24:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=michal@brzuchalski.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michal@brzuchalski.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain brzuchalski.com designates 188.165.245.118 as permitted sender) X-PHP-List-Original-Sender: michal@brzuchalski.com X-Host-Fingerprint: 188.165.245.118 ns220893.ip-188-165-245.eu Received: from [188.165.245.118] ([188.165.245.118:45685] helo=poczta.brzuchalski.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/B6-28528-80B9D085 for ; Mon, 24 Oct 2016 01:24:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id 39F7B2984235 for ; Mon, 24 Oct 2016 07:24:22 +0200 (CEST) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ttzgiUg1GUpg for ; Mon, 24 Oct 2016 07:24:20 +0200 (CEST) Received: from mail-qk0-f171.google.com (unknown [209.85.220.171]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 53F912984236 for ; Mon, 24 Oct 2016 07:24:19 +0200 (CEST) Received: by mail-qk0-f171.google.com with SMTP id o68so221174760qkf.3 for ; Sun, 23 Oct 2016 22:24:19 -0700 (PDT) X-Gm-Message-State: ABUngvfd5XxQXVJj60XSxKiOmVU0lvwA8bdJXZ2nnpxm6A4E0x4DE5/bzDfuZOp5QnTHba+F5/dOkfoH4zZmfg== X-Received: by 10.55.59.201 with SMTP id i192mr14773098qka.201.1477286658466; Sun, 23 Oct 2016 22:24:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.45.238 with HTTP; Sun, 23 Oct 2016 22:24:17 -0700 (PDT) Received: by 10.200.45.238 with HTTP; Sun, 23 Oct 2016 22:24:17 -0700 (PDT) In-Reply-To: <6b490ba3-ad2d-2a2b-9117-de53ce7fea7f@gmail.com> References: <1e7da1db-9fc6-a3ce-9cba-b219af2dd7d4@gmail.com> <7F1CFE1E-48A4-450E-BFD5-645100A16AE9@koalephant.com> <6b490ba3-ad2d-2a2b-9117-de53ce7fea7f@gmail.com> Date: Mon, 24 Oct 2016 07:24:17 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Stanislav Malyshev Cc: PHP Internals List , Stephen Reay Content-Type: multipart/alternative; boundary=001a1148c23e826f30053f959a1c Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --001a1148c23e826f30053f959a1c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 24.10.2016 07:05 "Stanislav Malyshev" napisa=C5=82(a)= : > > Hi! > > > In the same way that Iterable type hint allows you to safely do a > > foreach on an argument, object allows you to safely use property > > accessor syntax (i.e. ->). For me it would be most useful in lower > > level utility classes. > > Not sure I get this point. How you can safely use -> if you have no idea > what object you've got? You certainly don't expect every object to have > the same properties? You don't need is_object any more you can safely check instanceof, use Reflection, serialize etc. > > -- > Stas Malyshev > smalyshev@gmail.com --001a1148c23e826f30053f959a1c--