> On Jun 27, 2024, at 11:26 AM, Tim Düsterhus <t...@bastelstu.be> wrote: > > Hi > > On 6/27/24 19:09, Chuck Adams wrote: >> Personally I say let strtok be and just admit in the documentation that it’s >> weird because C. > > strtok() is not weird because C. It does not rely on the libc strtok() > function and did not since at least 1999 (and likely never did): > https://github.com/php/php-src/commit/257de2baded9330ff392f33fd5a7cc0ba271e18d#diff-fcf8a2a38ee4a0e3e2cb7c47251c9920ba8c5886d85969f676f9ddbee7aba503R332 Okay, how about “weird because POSIX”? The API gets the blame then, not any implementation. > strtok() is weird, because someone believed that relying on global state > was good API design. I find that excusable, because it happened more > than a quarter of a century ago. Oh I think strtok is awful, but it also looks like it beats the pants off the alternatives performance-wise. I imagine it’s also completely ignorant about unicode, so yeah… I guess it should at least be deprecated until being replaced by a userspace version with similar performance. —c
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Gina P. Banyard
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Mike Schinkel
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Dusk
- Re: [PHP-DEV] [RFC] Deprecations for PHP ... Mike Schinkel
- Re: [PHP-DEV] [RFC] Deprecations for PHP ... Gina P. Banyard
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Gina P. Banyard
- Re: [PHP-DEV] [RFC] Deprecations for PHP ... Mike Schinkel
- Re: [PHP-DEV] [RFC] Deprecations for... Stephen Reay
- Re: [PHP-DEV] [RFC] Deprecations... Chuck Adams
- Re: [PHP-DEV] [RFC] Deprecations... Tim Düsterhus
- Re: [PHP-DEV] [RFC] Deprecations... Chuck Adams
- Re: [PHP-DEV] [RFC] Deprecations for PHP ... Tim Düsterhus
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Markus Podar
- Re: [PHP-DEV] [RFC] Deprecations for PHP ... Tim Düsterhus
- Re: [PHP-DEV] [RFC] Deprecations for... mickmackusa
- Re: [PHP-DEV] [RFC] Deprecations... Gina P. Banyard
- Re: [PHP-DEV] [RFC] Deprecations... Tim Düsterhus
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Bruce Weirdan
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Gina P. Banyard
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Kamil Tekiela
- Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Gina P. Banyard