Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128484 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id AEA7E1A00BC for ; Fri, 15 Aug 2025 21:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755293002; bh=9NlJ7B6EF2cLsU7I4OQmexu0oCYm00F/ElywtCKiytE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Aw95rrD5gLqxBKoXbOKbTiT9tlS59kkfLi4SiiBuTb4OH6UBxJ4ALZJLjRi6UcsC8 eJCAlzbWqSk8PFbzg6rIwH7l6Jj1VIypjNzH9Rd7nJ5uvMtrwGpCjBzoGQkhmJx12j CMwRMufvSLppB6ZSmavmAUGxqai3j3lnTmyBR8cLo2aGdKZEezUm4L95ggnjiRejad hveHLXcuzi1APvyXl6iDzFb2taLjozn5Yu7LiCo27EMJzg2kMmNs5PyNbN7iJsjChO TDFxPVxLjZ+JbwWge8gYs8aHJcNkpL2ML8qPMkUmfdr+letlkf2mrGKIMTgaV1jCw5 MPRvgOsHu8PhA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 92027180040 for ; Fri, 15 Aug 2025 21:23:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 15 Aug 2025 21:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1755293096; bh=ojwn7OAcfrGnuY4Aan0v1rJRbbnoq5T8llCSahq0l3w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=WBDc77dthX2sm5X2ewONa4LpWOy8RbSZyZvAJgUmz02L2hHLhLjtipNJHD9jsO4en 8pg1hQmqax9PXEVA7PqJCF4+P8rBMnO5+Rxd1OB/C38XVg7OFOrNdTwQB1lqax0IzZ TvGDRcgORv+i6PUsyY80PMNJXJdaxBAi+5OrdsqENL7s7wLf0Og/wN//JJODTf6F8y LnhJHXI8oTNUFWR4DAul1t3B5T2Dd0hP9YtMwI16UpTM6zfLah/uhD0dzj0L8liAxU j9+y96WZNIXm5KAtLErq41/+bVfwz/nGNXKBYW3oiYFe3553Zksw3g22ftgqF6Uf8r ZN9Iqs51egubw== Message-ID: <89220d34-d526-48ca-8bf0-65e882058516@bastelstu.be> Date: Fri, 15 Aug 2025 23:24:55 +0200 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] Split as an alias to explode To: Vinicius Dias Cc: PHP internals References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 8/15/25 23:18, Vinicius Dias wrote: >> 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. > > 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 seeing `split(str)` or `str.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. These folks coming from other languages would naturally need to learn about `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. >> As 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)? This thread should be sufficient. We would need your Wiki username, though. Best regards Tim Düsterhus