Re: Split as an alias to explode

From: Date: Fri, 15 Aug 2025 21:14:52 +0000
Subject: Re: Split as an alias to explode
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-128482@lists.php.net to get a copy of this message
Hi On 8/15/25 17:53, Vinicius Dias wrote:
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?
I'd rather have fewer aliases rather than more of them. Using join() instead of implode() is already somewhat obscure (and likewise is sizeof() instead of count(), which I don't think I've ever seen). I don't see value in having multiple names for the same thing, that will just cause confusion for folks that are used to the other name.
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.
As implied above and also indicated by the changed labels on the PR: RFC please. Best regards Tim Düsterhus

« previous php.internals (#128482) next »