Re: Split as an alias to explode
| From: | Nick | Date: | Sat, 16 Aug 2025 06:14:16 +0000 |
| Subject: | Re: Split as an alias to explode | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128488@lists.php.net to get a copy of this message | ||
> On 15. Aug 2025, at 22:53, Vinicius Dias <carlosv775@gmail.com> wrote:
>
> Hello, internal folks.
>
> We have
join as an alias for
> implode so I think it makes sense to
> have split as an alias to
> explode, doesn't it?
>
> If I understood it correctly (I don't have any knowledge in PHP's
> internal code) this doesn't add a lot of maintenance complexity so I
> see no reason to not have it.
>
> I tried starting a PR but it's probably missing stuff (although it
> seems to work after I compiled and gave it a try).
>
> https://github.com/php/php-src/pull/19490
>
> Since this is such a small change, I wouldn't expect it to require an
> RFC, but if it does, I'd be happy to write it.
>
> Thanks in advance for any feedback.
For consistency with other newish string functions, I would like it better to have a
str_ prefix. However, str_split is already taken.