Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128488 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 3128A1A00BC for ; Sat, 16 Aug 2025 06:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755324781; bh=1dQA9f0dOZt/Ms9KjcxV/Gpc14P/Xnc7ZPvBNwMtCrw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=GxZlRBbjqNdnAj3O5Ew1UC8LsqB0BT5n+dUqmERgimiyrhnNSBbHPkn5go4fuNz6R frII63IV5TVp+9mQoyFDQDMHuRxGxdKj8XP4ya5IdU+Dpr7IL3Mv5BW/FYY0FMMHj2 PKagU+TmQB+SsB41fkIzg3WWNbhtWQyso5IxDcvC4q5fXNZQ8DsGuYw7snIsei63In iCLtHUsafD4IbugAQmvgUbNZEHWCWMjCVLO2sETlqtJD9swGHtxh7fjtUtqMW/OZxI ZfP9g5bWOezmEzvNajNzyWhN+hqg4I3jTUnPCoWi9/SNPt3DznuX/sFpM9eYAwH8iy b99zk3QS4hClA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 12FCF180040 for ; Sat, 16 Aug 2025 06:13:00 +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 avril.gn2.hosting (avril.gn2.hosting [84.19.162.247]) (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 ; Sat, 16 Aug 2025 06:12:59 +0000 (UTC) Received: from avril.gn2.hosting (localhost [127.0.0.1]) by avril.gn2.hosting (Postfix) with ESMTP id A609C1C40C5C; Sat, 16 Aug 2025 08:14:33 +0200 (CEST) Received: from smtpclient.apple (unknown [182.8.227.144]) by avril.gn2.hosting (Postfix) with ESMTPSA id 026521C4016B; Sat, 16 Aug 2025 08:14:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicksdot.dev; s=default; t=1755324869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1dQA9f0dOZt/Ms9KjcxV/Gpc14P/Xnc7ZPvBNwMtCrw=; b=NWEriMlwOlT2ftMODJR/R5mUUFDVR+ynitWLTLOSAlxx1weNMRbHcpjTPkn+YAxlkSfs6L uWSO+Ma/1pCZm8uKNW/80wpwm415jV8uMVlM2Nt8xHMzRjbQnXXBY/E2+GAg1dI8nIFh2r 7XmoSKMopzZXtRx0wvzxMcJWVrx1PkIrLxPBWg3r6Fpi4NoIcltqcDFGuJaipg4UAS4O46 o6pZLUKYolcUJ8S1+2D0xM9gxReE94JBsseIUeo5cO/PoCBnxcA7fXUIFkzt/d7tcbNYOR LH4iiwaAtBFqnoVkFaR3PWXm52tRJIU0dQGXKVEEb83qoirmN6N7wnfcOUEsMg== Content-Type: text/plain; charset=us-ascii Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [PHP-DEV] Split as an alias to explode In-Reply-To: Date: Sat, 16 Aug 2025 13:14:16 +0700 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: To: Vinicius Dias X-Mailer: Apple Mail (2.3826.700.81) From: php@nicksdot.dev (Nick) > On 15. Aug 2025, at 22:53, Vinicius Dias wrote: >=20 > Hello, internal folks. >=20 > 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? >=20 > 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. >=20 > I tried starting a PR but it's probably missing stuff (although it > seems to work after I compiled and gave it a try). >=20 > https://github.com/php/php-src/pull/19490 >=20 > 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. >=20 > 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.=