Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128485 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 A55AF1A00BD for ; Fri, 15 Aug 2025 21:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755293074; bh=5HLG+Gmpn3xDOIBG99+cDp01yntIBBbAkK7aQldv5EI=; h=References:In-Reply-To:From:Date:Subject:To:From; b=gpxQP4aLKeLDZjtCTke25zh+ey4aivKtFp8CfcpgSTfDzGOk6/lLnSRkIDb33pV2E Un6X84tKTMNIePHYh09ykWsbk4dv05DvJ23GVTgVqKeHuEm+x1oj/tEgRTzdpIk7qZ DZmyQ2VBXmMWmT234N7mxOva9KZAH2KPl8xsv5cre6gSoTIm6olodjJCE69j9kiY2b TrjoVf6jN7Txhf0puL0Lskc8e+/arlDaxEwIrka9IRJ6lwwna5nYixYqoZGYnz5JsE nbn5E97LvckzlwHwaEJNI/pW5RwqVU0zgZ1omIshKxgM9LEVvVRdjKBQUdb9D0HFtt rYHgc8g+yNFog== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8D988180079 for ; Fri, 15 Aug 2025 21:24:31 +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.4 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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:24:26 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-6188b656159so3906456a12.1 for ; Fri, 15 Aug 2025 14:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755293161; x=1755897961; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=5HLG+Gmpn3xDOIBG99+cDp01yntIBBbAkK7aQldv5EI=; b=UazZ5Rl4zGFi2ZxBczGES9rrErc0cj1rmRdMqEG74VmKrgO/iZKZdL0X/OQg0GtoAG eK/P/waTiQt86R/eq6SyBWuLlYTcdd4NPkAJ/Kfz0VXqxLiDEfzjLwMBzT/JIw1efBb4 w7IYHuCH1xRvPy9vigjOWMwHDMIXpNhbxItYIK84Bw52OrImMxTynlnszjFtsTk4112Q RuMXDGsif+VZCd597bWUwpZolblcAosvYOrpV4iwj0+GPlsNiFBFSiAJljsFrHlSxaBA HD1kMhqDd84TKJwr5QBs5MvC+Y4vcKIicdYK0HPh/27RIVALuGeB8QYpA24Y8uBGQggk 6hCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755293161; x=1755897961; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5HLG+Gmpn3xDOIBG99+cDp01yntIBBbAkK7aQldv5EI=; b=UWV8kFTHkIK7ZBW76IcmLkae4jAD+i/HGckMzglQ+Wc0+Aixw52qgIPRmp+8lR33t4 UjmHsM7NZobLMxyroT9LEvnMi9AahE83+72Vx7Wh1ZJ6ibjX9vVuTFlG+hBh7WEEkbNU T8iXPS++4WK9adCcxviGtuCF19vBZuMsGAqxQgQXxy3I3liisirp4pAxM4Wnxrrpm3VQ XapLXlzgXRSAGf67UFDlttVVq5+kdDeET5+U5iULGQqBI17McWkyOk1d38XN4laZOSRb SttyiAzjP+3DxGaZrV5HApJax9ZLbjkfCGm2j6FubD+xsIxqMNfGhYYVYHZ7A0j84+bd dOPw== X-Gm-Message-State: AOJu0YyQC6gpZwJgDZS08ty8WrWNw7QaG3EcRe4MQ8jVcQmBBzJLkIQp oOF0VDzfMiSCfGcNp8g9IEX2scYeB1gcNfbOkgkqf7f+niXwDTfTQ4RXWGPeTtW1ooLSw9giCSp 0sL5PNeroXsJjQ2nZ/SG5ERvOYuNeT4mwdw== X-Gm-Gg: ASbGncs9F7SmWsTH8rsBVf3tzZ6EXT2GwuG/WOJseTf/zkoTQHciXUSbQEDTi4wBUAd DJu3MLN3MITbWCyhbdP4u9G5syV1tg5ff1Sqj1gqetEqvBHarro/M30OgryMrazUFCWw3jJpJ39 HeVDw7VASHW+TYTlhH8sx57ULbyODz+bnD9Zasc4Cu0ogWD/eHDaeJjzF+azIL3qAlEc8Oj1ecl OWhsN9FzAcJ2614YRFBdAHk7XpmIXAORgowbw5cbfaHtB6RTLg= X-Google-Smtp-Source: AGHT+IHubPciQS7AfmlQ0kVi6jxZOtC1ol/gKpLO5pPw6kfIYZRbcLUHFR3L0fYK2jBuN0kpaJFA6hiN2GAzWVl/Q1c= X-Received: by 2002:a05:6402:5106:b0:615:adc4:1e66 with SMTP id 4fb4d7f45d1cf-618b055919fmr2682420a12.25.1755293161238; Fri, 15 Aug 2025 14:26:01 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <275514FF-2AF0-48D6-B57B-23B18ECCEED8@gmail.com> In-Reply-To: <275514FF-2AF0-48D6-B57B-23B18ECCEED8@gmail.com> Date: Sat, 16 Aug 2025 07:25:50 +1000 X-Gm-Features: Ac12FXxPBZEqCxoGaOy5BSUqunW5mTAUQXv0-nyN_MGDKJ9ZCEwJjgdMYGepU3s Message-ID: Subject: Re: [PHP-DEV] Split as an alias to explode To: PHP internals Content-Type: multipart/alternative; boundary="0000000000005a73f1063c6e0959" From: mickmackusa@gmail.com (mickmackusa) --0000000000005a73f1063c6e0959 Content-Type: text/plain; charset="UTF-8" I don't see any benefit to re-adding split() to the language. Why create more keywords for the sake of a function name with fewer characters? Code golfing isn't a goal of the language. Rather, we should be going the other way and removing aliases that are not needed such as chop(), sizeof(), join(), etc. Adding new function names should be done with a particular benefit in mind. For example, create the preg_escape() function and allow its first parameter to be scalar or a flat array (like multiple other preg_ functions) so that you don't have to call preg_quote() while looping an array of terms before imploding with pipes to create a dynamic pattern. Then the semantically misleading preg_quote() function (which doesn't actually add quotes) can be removed and the language is left with a more usable, more indictively named function. My 2 cents, mickmackusa --0000000000005a73f1063c6e0959 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't see any benefit to re-adding split() to the l= anguage. Why create more keywords for the sake of a function name with fewe= r characters? Code golfing isn't a goal of the language.

Rather, we should be going the other way and= removing aliases that are not needed such as chop(), sizeof(), join(), etc= .

Adding new function na= mes should be done with a particular benefit in mind.

For example, create the preg_escape() functio= n and allow its first parameter to be scalar or a flat array (like multiple= other preg_ functions) so that you don't have to call preg_quote() whi= le looping an array of terms before imploding with pipes to create a dynami= c pattern. Then the semantically misleading preg_quote() function (which do= esn't actually add quotes) can be removed and the language is left with= a more usable, more indictively named function.
My 2 cents,
mickmackusa
--0000000000005a73f1063c6e0959--