Re: Re: Any interest in a list type?

From: Date: Wed, 22 Apr 2020 23:07:27 +0000
Subject: Re: Re: Any interest in a list type?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-109795@lists.php.net to get a copy of this message
Hi Andrea, > Since it's pretty simple, I decided to write a proof-of-concept > implementation of such a check. For simplicity's sake I haven't > implemented a type declaration right now, just an is_list() function, > but it could easily be extended to one. The implementation can be found > at > https://github.com/php/php-src/compare/master...hikari-no-yume:is_list I wrote in a different response to the original email: > Working to have a vote on > https://github.com/php/php-src/pull/4886 might be a good first step, > and something I was personally interested in seeing in 8.0-dev. I thought I mentioned that there was a PR that implemented is_list() in another email in that thread, but it turns out I was mistaken - I just mentioned the URL. Sorry. That PR "Add is_list function" (https://github.com/php/php-src/pull/4886) copies the is_list implementation that the JSON extension uses internally for efficient serialization of lists. I'm glad to see the interest in support for is_list(), list types, or working on potential implementations. Thanks, - Tyson

« previous php.internals (#109795) next »