Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108401 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 344 invoked from network); 4 Feb 2020 20:39:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Feb 2020 20:39:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6954180540 for ; Tue, 4 Feb 2020 10:52:07 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 4 Feb 2020 10:52:07 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id r14so12953054lfm.5 for ; Tue, 04 Feb 2020 10:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6/EI5ttKkCgCBjtIjUJc1e44CoARd87ujM/d10Gc+1I=; b=Rp+yNDHFnQQlEIdCwz6RN87yIDsnuZUnc2L+KujKoBOEGFO3NimdWIyo+BU39pJFKl XVyaYuQwSwl7/Y112a90EDZB+3IUBGqpMDD4ur1L7NBXYHRbK4zLxdzxpf5Z+TjkxBIX tsshjvdrV6jlt5kBeZeKBvBd1HXq72g228zyx7I0sRzYx/71h9xtGolK5UPEOIrbu8SW l2K/ZtY/aGDULpGrOoZhy7vsuh800MbwXS5EJAJY7TnMpXn43/mIC5HWKsqyZ8CIRJE6 yQn80E9vGPv6IPg4Q6g4LOPcvqp2cxxR01Ed+pnS8Z6BYXxQDONEj2mpRx4StEGKewA1 ZP1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6/EI5ttKkCgCBjtIjUJc1e44CoARd87ujM/d10Gc+1I=; b=E9npDryg3lnqDn5y0vtu/f+xex09f0pB9XWEr1FKOfUHfo2u2umQ0JcTwTVA1iYO01 XgMXK7z8E8h3sIwNwE2liRnqMNeuUArcJqrEgfNSriDZ42AmVy+4E54eUGHWBlCy3skn nu1ig3KvCIyZZwHxA10PkUkOlJFY5D+V0pzJXQoPQNS1IlUKQ41W+q/cPC0g3lOCA15l hRW3fxuKkR+2fP/PDKJJWszCsUjZKlEZ3iRcy98w1CdNrc+IrguttdL6B+gAktFqM1nv h4zn5PNEqf3vdTo9WhovqvujHiFOpDs8XrtfZqGHRoC1ElLZv+ThH4nP9C5ySMulZt6O eynA== X-Gm-Message-State: APjAAAVKGAZIcAxwmsmtrIa2ZRk5ubGzTGUWqNHLvhsVufii81ROXAlZ qQgm9rC0UEIZUFZWpuKkda9X1pqsOAv5gxxdIQ5cqUI= X-Google-Smtp-Source: APXvYqwxc4pknIpYT50GUp8gkVBpEVBbeGN4AiHW7D9ndkl4yFqEfTaHVeW0TKxB+Ehggg1rtbsA+KokcfTp1E3fqdY= X-Received: by 2002:ac2:4884:: with SMTP id x4mr16071574lfc.92.1580842322837; Tue, 04 Feb 2020 10:52:02 -0800 (PST) MIME-Version: 1.0 References: <861afae0-4568-745f-6615-a252067cc506@aimeos.com> In-Reply-To: Date: Tue, 4 Feb 2020 19:51:53 +0100 Message-ID: To: "Aimeos | Norbert Sendetzky" Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Re: [RFC] "arrayable" pseudo type hint From: guilliam.xavier@gmail.com (Guilliam Xavier) On Tue, Feb 4, 2020 at 1:48 PM Aimeos | Norbert Sendetzky wrote: > > [...] > > interface Arrayable extends ArrayAccess, Countable, Traversable > { > public function toArray() : array; > } > > [...] > > If union data types are available and "iterable" is implemented as > alias, an alias "arrayable" for "array|Arrayable" may be added as well. About that last point: it would not be possible to have both the `Arrayable` interface and the `arrayable` reserved word because PHP is case-insensitive for those things (the same way you cannot declare an `interface Iterable` because of the `iterable` reserved word, ), so you would need another name (if you want the alias) -- Guilliam Xavier