Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123964 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 09D771A009C for ; Thu, 27 Jun 2024 20:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719521937; bh=c7gPvwlRWuJIiL8SmduJKarnWXeSW1nEFDxn4f3k85U=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=WeuK/FfSApFNh3qLwOWlnNIdC/Ps/6UzETk+gDc7ayBf1YYcUm/dj07ayRvAlBZQO ztygKPSFugHTvnhYvPQp+fJ9LAcJlLYCBU0Q1AbCSiSF3dXSuCu2YBSZ1idZB+i3G9 5kMVcSC3eaV3VxDPTjNvCxzUFv2ATxJrQMMqtethaC7LnJP0TxaMfNSrDVCpZlpMpA PjRU6fP6daOcuSvKnYu2MXVWY5n6gLXAyLqKmd37cGjAu1mt4yZ3nib7ZO+Dlt7D6r FTI4YiQY2jNRX+Qe3LdYlgnlAuc/miMZIfIQoKBo6I9XbH8DzKmMHEMgy0BeWUX4sa e4mVf9BP+LEwg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B46A4180589 for ; Thu, 27 Jun 2024 20:58:54 +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-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (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 ; Thu, 27 Jun 2024 20:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chaz.works; s=protonmail2; t=1719521850; x=1719781050; bh=sn9SEOx2wE7fGUnec9/RW65/uuZG2UJEa/KNvfdPsaU=; 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=hjMP/zVrKRslJdqm7yezPxS4G70+m1i/L1eLt83Rb/XcSB1vP8vhQA+o0r9vgDiG4 EPVlRbB9vEVWCf2Tazu0SFVNpT53t/vbmH+jCjjepz51SpiVhSeIhxRNpd8Gf29y8P 4Pk1sF16k4vgsSFhq65+2DHajk5GiWAfn/ZP22MIT7e6eMdOxnacrZjvgpCIbEDrZR Zx3CeMBpev+GTqKSkjw2/GLhYEdEQ3/0iUF8uHmhtOAGt42dPFE9z2MnXjOJQ/I/AS zjIrEr1NCax0nsMi2jhU2Vz1pujbsOYMdvJTR/R3pUKS7otoZYIcSojqnIKufJzdi7 pkgmTtuQyfBsg== Date: Thu, 27 Jun 2024 20:57:25 +0000 To: =?utf-8?Q?Tim_D=C3=BCsterhus?= Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Message-ID: <3B36FD93-F96F-46E6-93CD-EB47212EAB8E@chaz.works> In-Reply-To: References: <0BBF41AF-2516-44D4-A102-73580C5ED373@newclarity.net> <2A60B0A8-3105-4DE5-8C8A-8BDAB330C4BC@koalephant.com> Feedback-ID: 95748689:user:proton X-Pm-Message-ID: 2bd893c3c422f2ed39eebea9b6de8274216fd3eb 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: chaz@chaz.works (Chuck Adams) > On Jun 27, 2024, at 11:26=E2=80=AFAM, Tim D=C3=BCsterhus wrote: >=20 > Hi >=20 > On 6/27/24 19:09, Chuck Adams wrote: >> Personally I say let strtok be and just admit in the documentation that = it=E2=80=99s weird because C. >=20 > 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/257de2baded9330ff392f33fd5a7cc0ba27= 1e18d#diff-fcf8a2a38ee4a0e3e2cb7c47251c9920ba8c5886d85969f676f9ddbee7aba503= R332 Okay, how about =E2=80=9Cweird because POSIX=E2=80=9D? The API gets the bla= me 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 t= he alternatives performance-wise. I imagine it=E2=80=99s also completely i= gnorant about unicode, so yeah=E2=80=A6 I guess it should at least be deprecated until being replaced by a userspac= e version with similar performance. =E2=80=94c