Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130445 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 269B71A00BC for ; Wed, 25 Mar 2026 10:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774432993; bh=P5Mb1nAUzm3Nog4yhrvTaw65QwfD7GJqdvIYIueijFc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V92hpvpxoyHfYAkIb6qZK+MBqyJ/WqLnNjTnR32FM8ZU0aiyT33cxEyDYjgvuNhjo ctRcRjdjhZmPy/CVwEayCffv6YCyTREVHUadm7gzbWX1OI22vMpQFHk5CEnEkUTQts 1GOJ57Ep7GVw5b+yBEZQ6MSFALyxBAi6y9roAPpAaQvxkw9GJEcZ8oSOmVDAAiizS/ IIaMG4Bz8IvUXTAhaw8/MMivLU2qpdA5NU9CQ24qHGzO2TQ31YeN8P9ao3li56pLIX S26d2GZ7jB2+7SX7EDXpguOiXqAZDHaLE5iQ/ZtqENSv21IatRZDqyVVp6nUCn/Cx9 tELFTmhv0x8oQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A00B8180062 for ; Wed, 25 Mar 2026 10:03: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.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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, 25 Mar 2026 10:03:12 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5a27eb8311bso4751001e87.1 for ; Wed, 25 Mar 2026 03:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774432985; cv=none; d=google.com; s=arc-20240605; b=HeqoOXhha1kenBq/Lmn16ypgKdPCSY8P6a10L+SwlfJ866UuJUfu4eFuuJMV0PfUmb mULHrTatAEV2urcNeMzXaWxw+uuSNLtcOCk0i6eGQME+bW5wW8KhHiI96GE/xroRQCcP GMMqgyCFb1UJLNSGWG1sIYWSCFUnWUqLcQ/CUAc7w5sUGt2K6vj41dZeXUDjm9UEYqgg cky3oa/wlpQqA8iU8W0wOoMFY7/M5LBIjsfePwNe4KCM2KwWjEguqlqez7oW4ps4/cH2 sMaC6+0C+Eei0JkcJjpHSM1+arlfPYS36rCpVYb46jvfv5A0nc1znjvMhQF+XRIR64gu SUnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=P5Mb1nAUzm3Nog4yhrvTaw65QwfD7GJqdvIYIueijFc=; fh=WjIxh3BK31A6Wjfv68Q1k6sS4nlWi5iplUnKDLOpIZY=; b=PeGS83+ByOshqul21fw7xSl15OrrbpsOqnQG7hzZf9N+/DkCXoCVtNT9XOxeXUdeQy bBLBmgFTc6Aj6mUc0UKonpA3hNWc2E8STMVYEMCQR+O1GdkAODtcmgdkLwTCYDrD+XgX qSqJWFi0Uvp5EDrZAuICx2ONjZYj5zvbX3eQWfWFm+oW4E431Tp06giiuneMLovOVVnB 3+Ar2t9ewFY8MkHKTOpBZ2SoG7Ty/z7C9MeBz3H4zoCE1WDbya6oEfym0bpcZoKrns+5 7nQNh+54hhPi5m332AwtKOFe463Jn6bIOy9+Bl5Wf7cVwBQSliNnufWWo3zTY4lADetO BwaA==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774432985; x=1775037785; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P5Mb1nAUzm3Nog4yhrvTaw65QwfD7GJqdvIYIueijFc=; b=FXltxovLrqgDTmqE8N/tTYDWEmE/gggLIGjipqbSq0s7//w/7knmeSuZXyd0LIejjy y7X4xuKzjQ/oHq5JxWA2ysxBDEHoJH1BLbXAeZdCzs9x8rgdbj17HQpiJZ99G9TI9RJ9 N8pt3vzWJjaOOv1t02BrOUiL9wej/3zNU/StwLaR09hxTlFUuXlMfyaQCoSyMnC1zAjI gr6CpXB5qgx0eyOztmKmsi8MR43f4g4ni+6FDfQDV4jNMRZa8WIhj5thCZB/39PPSrAa 8hcFlfVO/SBC0NY/cmyQPtXWM9cObHeAEmsyYUygeTK0FJuL65m2qtjUyariTdQE55Qe VYhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774432985; x=1775037785; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P5Mb1nAUzm3Nog4yhrvTaw65QwfD7GJqdvIYIueijFc=; b=TL/nw74c15qd+XrHIOXVG2KFZ3Jcl4yvzJMjL3YKKiKN1NS1/Lkji7T9TjWwOHO6uW hE2gQuXTKVq9XN5nBdTw3GSBRIMSmx+txClxg3L/MkMp40cyeCEtjpFQgumr49v8lV4O /oKg12deuX6MEzEVDaivT1u3MmpPk7uN2/NM/weLTBKe/i3p3eepYpiQqexGo4OoA667 4ge46dyiU7VGZVaqy06kTXp/YxCQ/BmOPtOEdyMWSeU7+WlR3Bqj7SRGqJPd0DkxsF/Y b/T1OHHVcAnGZVFd24ZGq6p6cLn1t4n3iv7MoCONqfp5jI6wZEyYWFB3GR3S8zZ2M4Li RXNA== X-Forwarded-Encrypted: i=1; AJvYcCX1hsVwxk0PuoV6FQ5iR/qWfZ/21PvdhnjEKnOiB1d9bn3YqmhuGryHzmLbQnXx8o3Y+L68y9gyX7w=@lists.php.net X-Gm-Message-State: AOJu0YxRkAXCyb6aPSzvYn8fblgCjPozkuKvHuFPsxFvoe00GAHVHQCX q1RyO1P5dlNjtVwaMl7sQjnbtUev3Hk+8V+sU5sVn/EeOEwKerxHyBjBm1641L4KQHQhwtcOAq4 A0szE3st1bVuR3NAts3SewdLUq0ASatg= X-Gm-Gg: ATEYQzzPl4zYDZpchf+uGivEV+8GTOr9jLRzdsiUuiyyPKrvhPhKWFR0jiN8s4+NqQ7 0n+sQo7cd0qvOqs/XP+hpL8kBgKzrvtumyl9+twKfx8oF/2eTvLseATQPU0E0/TzOxsZA5HnMEl ZoM7Yuxh3hJE0A4YT0amyNK5ozUWDbHzkZwM3XxcpBLqS/HYlieP8stVqL341wpqL5DZBtYEeeo MjJdNpBA/PjbQ5UJ10fxMbcJYaMxIdzzoU3EOY7dAD5YknA8Ti9TpL3PFCcT7d8gcbKOmZh8Cd4 VqxfN1/amBV6Ox0GwbGWju178RRrUbinezhIJW3nakxSQFRpVn/9RwBws6O7MFNLmn5+q5VbAYv OCHBaEoIV+TlguYEYi2CYmxMSAQ== X-Received: by 2002:a05:6512:2350:b0:5a2:77a2:6f44 with SMTP id 2adb3069b0e04-5a29b992069mr1285502e87.31.1774432985030; Wed, 25 Mar 2026 03:03:05 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <3f4f6959.eaf.19cf0276cd8.Coremail.lamentxu@163.com> <4bf704c.b746.19d20d429ac.Coremail.lamentxu@163.com> In-Reply-To: Date: Wed, 25 Mar 2026 11:02:53 +0100 X-Gm-Features: AQROBzDL4MjiVNv0yG_pS-yUnbllnI99C4SZxBdt8XzR-vs356JWBDt2_9Qvlec Message-ID: Subject: Re: [PHP-DEV] [RFC] Remove \0 from default trim() character mask To: Levi Morrison Cc: LamentXU , "1372449351@qq.com" <1372449351@qq.com>, "internals@lists.php.net" Content-Type: multipart/alternative; boundary="000000000000c0242b064dd65fde" From: ocramius@gmail.com (Marco Pivetta) --000000000000c0242b064dd65fde Content-Type: text/plain; charset="UTF-8" On Tue, 24 Mar 2026 at 19:29, Levi Morrison wrote: > There hasn't been much discussion, so dear internals: are simply busy, > un-opinionated, or what? > I'd vote against this proposal: `\0` being considered one of the stripped characters is now a downstream assumption, and this ends up being a BC break with little to no advantages. From a semantic perspective, `\n`, `\t` and `\r` are also "control characters" in other contexts (not the C world). Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ --000000000000c0242b064dd65fde Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, 24 Mar 2026 at 19:29, Levi Morriso= n <levi.morrison@datadogh= q.com> wrote:
There hasn't been much discussion, so dear internals: are simply busy,<= br> un-opinionated, or what?

I'd vote a= gainst this proposal: `\0` being considered one of the stripped characters = is now a downstream assumption, and this ends up being a BC break with litt= le to no advantages.

From a semantic perspective, = `\n`, `\t` and `\r` are also "control characters" in other contex= ts (not the C world).

--000000000000c0242b064dd65fde--