Re: [RFC] Deprecations for PHP 8.4

From: Date: Wed, 26 Jun 2024 12:17:31 +0000
Subject: Re: [RFC] Deprecations for PHP 8.4
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Wednesday, 26 June 2024 at 06:39, Dusk <[email protected]> wrote:

> On Jun 25, 2024, at 22:18, Mike Schinkel [email protected] 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_substring-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.

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


Thread (68 messages)

« previous php.internals (#123866) next »