Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123866 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 qa.php.net (Postfix) with ESMTPS id AEC941A009C for ; Wed, 26 Jun 2024 12:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719404337; bh=8CkOD3zNupjo4C5B9Pv06sN249KvyUkaFhU5tGo6O7Y=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=MrMWSIHOk9UYpSucQhhsw8E0XszhD6Zd8UjpwMYyiG1HMzJwTo4UEzf72lb9awGD1 7If1rOSJkw84jay9J6k3QuBxGmVaiLqQ+S6NjDyAICNMQCFOPNHiqrpgv8lGdGV9h5 WkYHWDUXllABc2lfWTk3zn669tS/dI8wFjHkz966GBR6O+0XNT8zxiNELoUKnXGhth PJltiB5lHlSFeK4wGuF2goNIFXmN9K6zKjiBXlzxOg7MNwHcDHdiHSsN7wxkafJRdc mJtm9EsoYL4iC8XhUz8v9utH27M0SrJV1B38If9n0kKUpzeZExXv7dc4QuPf1qFZMl QOTNUAOQokBYA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D765F180846 for ; Wed, 26 Jun 2024 12:18:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) (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 ; Wed, 26 Jun 2024 12:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1719404254; x=1719663454; bh=8CkOD3zNupjo4C5B9Pv06sN249KvyUkaFhU5tGo6O7Y=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=aHNw7K/UBlZtb6/rV4XeCWZMpBTlvXwp8wR+HWcz0R5GbpQXBSISE3+tpZF888EKi YQhCQTIHm+3L/kFK0GqAi28RnEhbF1hoEd4+wv+gIkLv+T07fl/0hvN7a3w60QL24a pBb1nl9jRQek+JVoOU8anVoauARkVqblTogOU51kYiL817X0kQWobCI/Lp2zbNad5o wSAD3q+LOyQZtLkwhyAArn3maX1iJClrtMM9b/QvVOEmcyYI5R5hQjfz+yiVvBWlpq qkPeU+y/aQLDGErndvjVpV6IFpQ/yONjX9L39OCGLgQ4bhI+a/dcBf16v4EWnen8mK iRIieo9EijszQ== Date: Wed, 26 Jun 2024 12:17:31 +0000 To: Dusk Cc: Mike Schinkel , PHP internals Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Message-ID: In-Reply-To: <0DE5ACCD-C321-4872-ADDA-B7F716FC41B0@woofle.net> References: <0DE5ACCD-C321-4872-ADDA-B7F716FC41B0@woofle.net> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 37d39ea112e261d483242fce5de6937c9d8d3034 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Wednesday, 26 June 2024 at 06:39, Dusk wrote: > On Jun 25, 2024, at 22:18, Mike Schinkel mike@newclarity.net wrote: >=20 > > This leads me to think `strtok()` should not be deprecated given how in= efficient string handling in PHP can otherwise be, at least not without a m= uch more efficient object for string parsing. >=20 >=20 > What would be really useful as a replacement for strtok() - among other t= hings - would be a function analogous to MySQL's SUBSTRING_INDEX(): >=20 > https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_su= bstring-index >=20 > Where SUBSTRING_INDEX($a, $b, $c) is functionally equivalent to explode($= a, $b)[$c], but with the added ability to use negative indices to count fro= m the end of the input. That is a rather interesting function that I did not know existed in MySQL. I agree this would be useful, and probably should be its own RFC/thread. Best regards, Gina P. Banyard