Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101650 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85344 invoked from network); 22 Jan 2018 09:52:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2018 09:52:59 -0000 Authentication-Results: pb1.pair.com header.from=php@duncanc.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@duncanc.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain duncanc.co.uk from 209.85.216.181 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 209.85.216.181 mail-qt0-f181.google.com Received: from [209.85.216.181] ([209.85.216.181:42048] helo=mail-qt0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/55-28995-874B56A5 for ; Mon, 22 Jan 2018 04:52:57 -0500 Received: by mail-qt0-f181.google.com with SMTP id c2so19224667qtn.9 for ; Mon, 22 Jan 2018 01:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duncanc-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=K3D/AlxAcM93vL3q9wRj8xUMfv4/u/SXfTBRVRKJ7UE=; b=oguQr2rSP7Lb3R87AkhLxVJeFxFW+Nz+NQjkBKZDYUiL0m1tmoHLvNLq9idiBqYZ1T gRaPezjIQKcokQ694t7C3ZThHO45ZDGgr8XnsLyLUzS1rHOdomsdIbzli+PlrgKzyeXo dnndLLGSCfoVqBHI4X607mDl/s25dwJM/byvvptg/ZPCiuMIpwNquKeY+QK12Wx9NpAk KO14VAPihtlQ9Li2wvFLOoXLUZ9CFC0mxvM9KXiJxmpG70Uztcv4oUMoVi8dQU0bl3Sc r6iJoYS3QcbZRHQT/+GWNrKfw0eN9CsFd3YjfSw5IAiA8SjMZfvYqxvwJ2CEPvaVcGZO u47A== 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=K3D/AlxAcM93vL3q9wRj8xUMfv4/u/SXfTBRVRKJ7UE=; b=VyXTpNhpF7ELv5qm5Adp5P1PiEoa8qVw617WsdXWMPyulf5BqafzovtelklCuup0at Idlyagll14shCfVE2B9RSE/bI9GWtliJ11S8+rLZ97XGiqYukBIUIKv0TBZ/Bq96CCRk 2lSFOx/0i2j6MIawoGHI24dbNh7Xp2Dl8uFINSt+QP+KEr2CLesvauoi7fXDHX8RcRfj q6dAKe0Qk/EYhBTToZydnn24pEDoyGvvNQYbO0lbDSV2aZuCSmvRjib2b24xsQCM9Qoq 1L0uu3Q1hG/YneNWzfAv8riKZj0LlwD+6s+Klf1R1XVUmxuTqilYTElgRFiS4H8Edd9D ggRA== X-Gm-Message-State: AKwxyteYxPSVF6a/n/5PP7a25PxC+lStgGcpUM1WPRXisz0GaC9Y3gtN FxzwpBMV9acTohqa/nyxkMw0ecms X-Google-Smtp-Source: AH8x225xHegA0e28aa92tSS6feMWm+bmdJL5FdnlzY7aENe9oqr/3JzHeYrtTMHDpowhalG53EmUYw== X-Received: by 10.237.32.3 with SMTP id 3mr9210862qta.47.1516614774297; Mon, 22 Jan 2018 01:52:54 -0800 (PST) Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com. [209.85.216.175]) by smtp.gmail.com with ESMTPSA id c1sm11257764qta.52.2018.01.22.01.52.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 01:52:53 -0800 (PST) Received: by mail-qt0-f175.google.com with SMTP id a27so6065693qtd.1 for ; Mon, 22 Jan 2018 01:52:52 -0800 (PST) X-Received: by 10.237.46.130 with SMTP id k2mr10153155qtd.85.1516614772409; Mon, 22 Jan 2018 01:52:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.18.206 with HTTP; Mon, 22 Jan 2018 01:52:51 -0800 (PST) X-Originating-IP: [195.99.194.20] In-Reply-To: References: Date: Mon, 22 Jan 2018 09:52:51 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Gabriel Caruso Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="94eb2c0671f2c5590305635a643a" Subject: Re: [PHP-DEV] [RFC] is_countable From: php@duncanc.co.uk (Craig Duncan) --94eb2c0671f2c5590305635a643a Content-Type: text/plain; charset="UTF-8" Hi Gabriel, I proposed a similar function at the time of introducing the warning, but it doesn't look like I got around to creating an RFC for it: https://github.com/php/php-src/pull/2206/files During this work we realised that objects don't have to implement the '\Countable' interface to be successfully handled by 'count()', internal/extension classes can implement a 'count_elements' handler and ignore the interface. I'd suggest that 'is_countable()' should be consistent with 'count()'. Thanks, Craig --94eb2c0671f2c5590305635a643a--