Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17430 invoked from network); 13 Nov 2016 21:10:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2016 21:10:42 -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 209.85.215.44 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 209.85.215.44 mail-lf0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:35210] helo=mail-lf0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/F9-31581-0D6D8285 for ; Sun, 13 Nov 2016 16:10:41 -0500 Received: by mail-lf0-f44.google.com with SMTP id b14so45705734lfg.2 for ; Sun, 13 Nov 2016 13:10:40 -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=9aup3Ttx5PdPrgS6N5WlmA1y23/k7BePGRoZSeF42/k=; b=nfVkfyHUr5Y1o7b7w8f7eNOiPgbYP+euQP9Pp2wBhRlnd17mRXB/SYZY0S1YImLUp8 mcild8qr3sc/wmGnbC0BU7A8CRMcmOPikpsjZdUI+JQ6gavVntrX+3EHrV10AMVbbHCx haHbPzyyYGau44bvwr6A7lqsnnIDalJUeAAjx13Q9ccWju0c8vNIpxXEPkDSG7ere8VS F75nq4D8LGxBQUUJlZHdIu9BhJofSIc+M/G7hIBmP1U5d9wIN3FzltMSDZKuJIKmyZuq jgbdU6ZpbxcjxVtdWAr1MDyih9YWddge5sr9Z+YsFsJKgfumCV8kvWleXxnxVHSOzQsI FbnQ== 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=9aup3Ttx5PdPrgS6N5WlmA1y23/k7BePGRoZSeF42/k=; b=M7w5Np8UGatciGBBj026kkI27ZDiibQ8bgqNC1GlFd5y294A69Su5js7WHH60ToBTQ 29qOdmRCJgkNRio9M3dHOsBRou+0oRqarez6t3HYIgXKx8265JFP5/25p/7T8i2fbZYk x8WMWNhzxaT9vczxjPi2ue6MDd/OM2oU3wLzk3Ru2g0n3D+ltBdM1ldG322Ulb1o3671 Dt3xa0aZ/+Cfl7A8hc3IiggEdJoHkPrlAIeTy+RSgqJ3ff8y4oSPya7vqVmRREk9I03f g3H36AIr7O3CeuCbYAJ/ghpuQaXQGHyvFkd9ZVxOtsQ1UKuyeXsy+G1MimVX7JaZuBA0 79Mw== X-Gm-Message-State: ABUngvddukk0RlSuPTWE61ow8OW8Z7kKCIzDs9prmqTN0+/O6hzwU6+9v7DtmHow80jYcg== X-Received: by 10.25.24.208 with SMTP id 77mr6973476lfy.101.1479071436248; Sun, 13 Nov 2016 13:10:36 -0800 (PST) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com. [209.85.215.52]) by smtp.gmail.com with ESMTPSA id l141sm4470095lfl.0.2016.11.13.13.10.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Nov 2016 13:10:35 -0800 (PST) Received: by mail-lf0-f52.google.com with SMTP id c13so45744793lfg.0 for ; Sun, 13 Nov 2016 13:10:34 -0800 (PST) X-Received: by 10.25.196.136 with SMTP id u130mr6643701lff.62.1479071434294; Sun, 13 Nov 2016 13:10:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.202.135 with HTTP; Sun, 13 Nov 2016 13:10:33 -0800 (PST) X-Originating-IP: [82.132.224.48] Received: by 10.114.202.135 with HTTP; Sun, 13 Nov 2016 13:10:33 -0800 (PST) In-Reply-To: References: <2b46dcb5-03e2-59dd-b04f-d1877fd603bc@gmx.de> Date: Sun, 13 Nov 2016 21:10:33 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Niklas Keller Cc: "Christoph M. Becker" , Internals Content-Type: multipart/alternative; boundary=001a114b1a167065a00541352752 Subject: Re: [PHP-DEV] How to detect classes with a count_elements handler in userland? From: php@duncanc.co.uk (Craig Duncan) --001a114b1a167065a00541352752 Content-Type: text/plain; charset=UTF-8 > How about just making those classes implement the interface instead? Christoph pointed out that there may be classes in extensions that use count_elements. Also it would make userland code simpler: is_countable($thing) vs is_array($thing) || $thing implements \Countable --001a114b1a167065a00541352752--