Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92609 invoked from network); 22 Jan 2018 12:34:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2018 12:34:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 84.19.169.162 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 84.19.169.162 mail.experimentalworks.net Received: from [84.19.169.162] ([84.19.169.162:52312] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/46-28995-B6AD56A5 for ; Mon, 22 Jan 2018 07:34:54 -0500 Received: from kuechenschabe.fritz.box (ppp-46-244-183-64.dynamic.mnet-online.de [46.244.183.64]) by mail.experimentalworks.net (Postfix) with ESMTPSA id 692B06C0D3; Mon, 22 Jan 2018 13:34:48 +0100 (CET) Message-ID: <1516624483.18039.11.camel@schlueters.de> To: Gabriel Caruso , "internals@lists.php.net" Date: Mon, 22 Jan 2018 13:34:43 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] is_countable From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On So, 2018-01-21 at 18:01 +0000, Gabriel Caruso wrote: > After that, I like to propose and discuss a new function for PHP 7.x > (current 7.3): is_countable. > > *RFC*: https://wiki.php.net/rfc/is-countable. The primary place for this imo should be reflection. If there is high demand we could also add a shortcut function like proposed (no strong opinion on this either way from my side) Of course I notice that the current reflection can't cover all the cases you want to cover, so maybe it might be interesting to extend reflection with something which works on all variables/zval and wraps all the is_* functions. johannes