Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130008 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 lists.php.net (Postfix) with ESMTPS id 679CE1A00BC for ; Wed, 4 Feb 2026 14:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1770215835; bh=MSrU7SzcYWmNK5XUJue2oA9sIxMm11eyA1Qwqp6Fwtk=; h=Date:From:To:In-Reply-To:References:Subject:From; b=YPAbvArSG1Et4wckZ9nqG4SvYaYCIqnkLWGRbqsgIvA5e2clD0sFKEKkeqwRM1za6 /mTjcpl709Am2/nYsERThM9hbOb3Q/7n1xiUDD6OYQ0sLxFDyCwra81G0ieHgGKz4a EETarhiFniOL+Itn/wzVXel9A9HEaPa6i29a/ljPqyfgWgYjTS1/Xl7hngm3U/azNg ZmYPuFkHYXNBQO3BBfgHXGvcHrv4c177KsqQwCAt7WS5JENEB18jPX78ozWK3m1TVu cSSjKUiY10crma7zcOQtxjKUlVTV1s1be1aTGihPqG2WtjIFX+LR9LZtqaDLG07Exk 20y5L63TH7LqA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AB930180341 for ; Wed, 4 Feb 2026 14:37:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Feb 2026 14:37:10 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8100514000D7 for ; Wed, 4 Feb 2026 09:37:05 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Wed, 04 Feb 2026 09:37:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1770215825; x=1770302225; bh=2s3OvBv8/KYbntcWanfSA nU2HiZdow2KAksu/jey0jY=; b=RF/yRftZRz+vMOrROw9xImdGnCwf6bXiLVOta VBcQbbCs3APuIKOcaRVUSPNA7HPGlseckmLog0RENuvFu8ZBp5CDO+Gw8OhPl5lc g3UwWH7gtExgoTWAXz15zNZETPda4cKvJueqjZeGlrjVkWcgqcmU2kSILpU0aXGo mjub7IJyIkwjq/bRaR0PEJH2zTd+MhDSWlDTZJB8NeOLlVZGBTsIOsT0saoBpu2T bLL4k7v2DLRwl45Ue4rmA/QgKrSh/NOJA0Jw8JgnqLwQvMOX7ddMbrdDcLr4+ktd oaTZ/iQdod6VsID6Wlu3XOvZWr72YxupBLJNdZxkocEa52yUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1770215825; x=1770302225; bh=2 s3OvBv8/KYbntcWanfSAnU2HiZdow2KAksu/jey0jY=; b=nNr29vQv2bjuyazjW Aeg7rZNjDFn/npJZOXizhyjeWDu+JKEuRIHmvaHJ+7MkDQ/8YS7D1dDkVEk0ItF6 1NpyQNSEJtD9kmmQQTbYa0d7dF4jcsBsvhk4PZrcfG5mXxsrDnk3EuBP3TICVNsp uBfs6x5gUVhSaMuxfApG12nqgaYDw639HCfUViIa7+c4XRQNStid8/GZjsvM7pjI lBvpMXegmiL711vLenswRjF6LbH9+qzyQP4ak1E/9+wOXUQZMuzkMDhIHKremBiw io4as11b3FyS6LJ+EmJTBEukkB4aq5IDRU1YnvPt4TkrrWuwXTF/FVKZmuM5CQfd 1nkfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddukedvjedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeehjeefvefgfeduteffffdvheeiudekieefleevvdduiefg keehvdevheffvdegteenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhf ihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5A6DE700065; Wed, 4 Feb 2026 09:37:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: AXOGvKZ0Wvvo Date: Wed, 04 Feb 2026 08:36:44 -0600 To: "php internals" Message-ID: <9310fbfc-a7bc-44df-beac-5a46d6b14f61@app.fastmail.com> In-Reply-To: <20260204011605.D6E871A00BD@lists.php.net> References: <4deea2df.a2a0.19be6247b75.Coremail.lamentxu@163.com> <20260130003750.5CA2A1A00BD@lists.php.net> <886205c77a8fdf08f4ddfb28b7605e51@bastelstu.be> <20260204011605.D6E871A00BD@lists.php.net> Subject: Re: [PHP-DEV] [Vote] Add form feed as a whitespace character in trim, ltrim and rtrim Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Tue, Feb 3, 2026, at 7:16 PM, Ben Ramsey wrote: > On 2/3/26 08:18, Tim D=C3=BCsterhus wrote: >> Hi >>=20 >> Am 2026-01-30 01:37, schrieb Ben Ramsey: >>> I've voted "no" on this RFC since the RFC says the proposed PHP=20 >>> version is PHP 8.5, which I interpret as meaning PHP 8.6, since 8.5=20 >>> was released in November. >>> >>> Even if PHP 8.6 is the proposed version, I still think the target=20 >>> version should be PHP 9.0, since this is a BC break. I mentioned my=20 >>> concern about this being a BC break in the discussion thread. >>> >>> The RFC is also clear this is a BC break. It says: >>> >>>> This is a **backward incompatible change**. Scripts that rely on >>>> `trim()` *preserving* leading or trailing Form Feed characters will >>>> be affected. >>> >>> I'm a little surprised by the number of folks who voted "yes" on thi= s,=20 >>> despite it being very clear this is a BC break and PHP "Next" is the=20 >>> implied proposed version. >>=20 >> I however disagree that the target version of this RFC should be 9.0. >>=20 >> It technically is a BC break, but so is almost anything else, includi= ng=20 >> any bugfix. Our policy explicitly allows BC breaks in minor version, = but=20 >> gives some recommendations as to what BC breaks are acceptable: https= ://=20 >> github.com/php/policies/blob/6ff3612f7f60e9d91188d986cfb4ca84d0722732= /=20 >> release-process.rst#minor-version-number >>=20 >> While the proposed BC break would be a =E2=80=9Csilent=E2=80=9D BC br= eak, I believe it=20 >> qualifies for the =E2=80=9Ccase by case=E2=80=9D exception, since: >>=20 >> - It is unifying the behavior with other programming languages,=20 >> including standards defining what =E2=80=9Cwhitespace=E2=80=9D means. >> - trim is well-understood in the community as =E2=80=9Cremoving white= space=E2=80=9D. >> - Thus it not removing something that clearly is whitespace could be=20 >> interpreted as a bug. >> - If users for some reason rely on form feed characters being preserv= ed,=20 >> I expect them to be well aware of their special requirement. >> - For those users, mitigating the break is possible with basic toolin= g,=20 >> by simply searching the codebase for all occurences of `trim(` and th= en=20 >> adjusting the calls to explicitly specify a list of characters to tri= m=20 >> (or to replace them with a wrapper). >>=20 >> For these reasons I don't think we should wait several years until PH= P 9=20 >> to make the change. We're shipping more impactful breaking changes an= d=20 >> bugfixes with every minor version. >>=20 >> Best regards >> Tim D=C3=BCsterhus > > > With this in mind, I'm still wary of the change, but I wouldn't vote=20 > against it if it targets PHP 8.6. > > Cheers, > Ben Where as I would, because we catch flack every version for how many "sma= ll" BC breaks we have. It hinders people's ability to upgrade and gener= ates bad PR for PHP routinely. Majors exist for a reason. --Larry Garfield