On Mon, Jan 22, 2018 at 5:34 AM, Johannes Schlüter <johan...@schlueters.de> wrote: > 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.
You did not provide any justification. As you do so keep in mind a lot of code is going to look like: if (is_countable($arg)) { /* take a different code path, such as pre-allocating storage */ } This is not an easily reflectable thing because it's based on an argument which may not even be an object type. Additionally we have a well-established convention of `is_*` function for types specifically known to the engine as is the case here. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php