Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123855 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 5D8FB1A009C for ; Wed, 26 Jun 2024 05:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719380439; bh=xv74c2cPVrR7QWHYLopMIhEhwAZ7j/vundjGPpPn5RI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=eJV7sklZsdf4TZYv32wrAzmw5gmNTPBB3UCT4ma5yTIsETg5v5O5ZpL/lQO1a97q2 tOuVhG0c87P1g6d1kVCEqCTVWwCCVYOlfHIN7Ad2qchdHE8X26g1EOkMIwEtpzT1gi EL7xF1wDWrgyp37Dyg3zyYeR7tWzl/ekpbUGHMXPowMSt3JRcIKfzcLkyx5pPXInBf 29vU5eNeh3zARmOThtQiUHA7f94pl4thc2KuPtpBQGrZrQdEfTZLWidEk+JF+Gyiie a12F4URgGY8MvtT0QLP7L3twaN5dTWv5ol8bv80kDYqujyF0INXh+e+lWLw6sSPYCI HnMQOLpUp3huQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6B397180076 for ; Wed, 26 Jun 2024 05:40:38 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,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 malamute.woofle.net (malamute.woofle.net [74.207.252.100]) (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 05:40:37 +0000 (UTC) Received: by malamute.woofle.net (Postfix) with ESMTPSA id 5501F1EF2C; Tue, 25 Jun 2024 22:39:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 In-Reply-To: Date: Tue, 25 Jun 2024 22:39:08 -0700 Cc: "Gina P. Banyard" , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <0DE5ACCD-C321-4872-ADDA-B7F716FC41B0@woofle.net> References: To: Mike Schinkel X-Mailer: Apple Mail (2.3774.600.62) From: dusk@woofle.net (Dusk) On Jun 25, 2024, at 22:18, Mike Schinkel wrote: > This leads me to think `strtok()` should not be deprecated given how = inefficient string handling in PHP can otherwise be, at least not = without a much more efficient object for string parsing. What would be really useful as a replacement for strtok() - among other = things - would be a function analogous to MySQL's SUBSTRING_INDEX(): = https://dev.mysql.com/doc/refman/8.4/en/string-functions.html#function_sub= string-index 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 from the end of the input.=