Re: [RFC] Remove \0 from default trim() character mask

From: Date: Tue, 24 Mar 2026 17:11:08 +0000
Subject: Re: [RFC] Remove \0 from default trim() character mask
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-130432@lists.php.net to get a copy of this message
Hi all, I believe the RFC “Don't trim NUL bytes by default” is ready to move to the voting phase. I intend to open the voting period soon (typically 7 days). RFC page: https://wiki.php.net/rfc/dont_trim_nul This RFC proposes to remove \0 (NUL byte) from the default character mask of trim(), ltrim(), and rtrim(), to align with common expectations and avoid unintended trimming of legitimate NUL-containing strings. Please tell me if there are any final comments or concerns. Thanks. Best regards, Weilin Du p.s. Not that sure if this email is going be be sent in the correct thread, so I would post the thread link here if it doesn't https://externals.io/message/130318

« previous php.internals (#130432) next »