Re: Split as an alias to explode
| From: | Tim Düsterhus | Date: | Fri, 15 Aug 2025 21:24:55 +0000 |
| Subject: | Re: Split as an alias to explode | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128484@lists.php.net to get a copy of this message | ||
Hi
On 8/15/25 23:18, Vinicius Dias wrote:
These folks coming from other languages would naturally need to learn aboutI 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.This is also a very valid point and I understand this line of thought. My thought, though, is: people coming from different languages are used to seeingsplit(str)orstr.split(), so this would make PHP a bit more familiar for them. Small changes like that can make a language more "liked" for people learning them, IMO.
explode(), since that's *everywhere* and folks that are already familiar with PHP are unlikely to go ahead and bulk replace everything. I also don't believe that a having a more familiar name for a single function in the stdlib is actually going to make a meaningful difference.
If *really* desired, use function explode as split; already works.
This thread should be sufficient. We would need your Wiki username, though. Best regards Tim DüsterhusAs implied above and also indicated by the changed labels on the PR: RFC please.No problem. I'll send a new e-mail to the list asking for karma (or can this message in this thread serve as the request already)?