Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46911 invoked from network); 17 Nov 2016 14:01:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Nov 2016 14:01:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@duncanc.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@duncanc.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain duncanc.co.uk from 74.125.82.47 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:36970] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/EF-05303-728BD285 for ; Thu, 17 Nov 2016 09:01:12 -0500 Received: by mail-wm0-f47.google.com with SMTP id t79so147068121wmt.0 for ; Thu, 17 Nov 2016 06:01:10 -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=tKmUScd9ExDKH0Kh9TfsI7OEPy8o8IFEMjO/y0A8X4U=; b=ZZ2dhx+HHhU2mG6ZIsa75W0DvuhOgKDZBNAY9wN2KNBO5izV9eTOQyS4AHf/MopX2j 2CCSr8rjMme76/4UBd9XYD8uhOobAISjxmu+4zHrlLe0dPEuXfLrDkXPlI0lLFfAQ+AM OdtmTTW9VK7Y2jlFMvNINYs30NToUt+bL0hXkI8bO3urJxBRqKnt0y4k92q0kYT2bqvd DKVgjO0TP210sZR/PPXIRDXMQDPSFVmGN3UBmlaPMw75ArvXOxglcYPfNiRWh8UlKz3v Ofsq4ZnYXOusd0fRoJQ2seKhY3AMybw43c5EksWsQt7wnVjukd9LPP46S1n9aqlteLUa 9ylQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tKmUScd9ExDKH0Kh9TfsI7OEPy8o8IFEMjO/y0A8X4U=; b=gpg/v31YaUsfJrpBiWQAr/cjpjWw0Jujghj47QlELNP6weMY8BaJgca3yU7DIX0eZv UGy7Qq/cbArT7M9JVhkWpYVaWDHVeIfRZX1zjbbNum/IAhlwlnB0aastrUXJpZgl8N8z n6UxZyCDm8V+LS+Eybl4ntWMPZjDeO9HtbTZRM0d299kzeHmvxb+v5mFaB3sipFf91MP FzxuJyNGqfaeED/rb9us8ABOwvlAQ6OdqxB8YYfWdXLwWhDtqb9qTZTAIdUASyq80wB8 4zCL78Bd3KGbvKeAVa3jTUjYJtz6niocqcMT1ERFhZukUqWdt22lTHGNdnJOoSuABLkQ /tuw== X-Gm-Message-State: AKaTC00HOyD+4YqYGccBNkofrKWa/eOTSzIy2vf1zNwXneSkiSZtxi9wC7mMf0gVK45SZQ== X-Received: by 10.194.55.104 with SMTP id r8mr2187925wjp.137.1479391266530; Thu, 17 Nov 2016 06:01:06 -0800 (PST) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com. [74.125.82.54]) by smtp.gmail.com with ESMTPSA id x140sm15803260wme.19.2016.11.17.06.01.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 06:01:06 -0800 (PST) Received: by mail-wm0-f54.google.com with SMTP id t79so147065892wmt.0 for ; Thu, 17 Nov 2016 06:01:05 -0800 (PST) X-Received: by 10.25.21.205 with SMTP id 74mr543875lfv.138.1479391265178; Thu, 17 Nov 2016 06:01:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.202.135 with HTTP; Thu, 17 Nov 2016 06:01:04 -0800 (PST) X-Originating-IP: [195.99.194.20] In-Reply-To: References: Date: Thu, 17 Nov 2016 14:01:04 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Josh Di Fabio Cc: Internals Content-Type: multipart/alternative; boundary=001a11408008d880c305417f9e51 Subject: Re: [PHP-DEV] Countable Type Hint From: php@duncanc.co.uk (Craig Duncan) --001a11408008d880c305417f9e51 Content-Type: text/plain; charset=UTF-8 On 17 November 2016 at 13:50, Josh Di Fabio wrote: > What's the benefit of such an interface? Why not simply ask for `int > $count` in your param list instead? > Using the example from my original email, it's a bit awkward to always have to pass the count of a countable: handle_records($result, count($result)); The number of items in a countable can be established from the countable, asking for it as a additional parameter doesn't make much sense to me --001a11408008d880c305417f9e51--