Re: Pre-RFC: adding a Regex\CompiledRegex class for compiling regular expressions

From: Date: Sat, 26 Sep 2026 14:31:23 +0000
Subject: Re: Pre-RFC: adding a Regex\CompiledRegex class for compiling regular expressions
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-132657@lists.php.net to get a copy of this message
Hi On 9/26/26 16:24, Jordi Kroon wrote:
My apologies. It doesn't have a __toString() implementation. However it does have a non-magic toString(). Which in the case of URI recomposes to a normalized string.
Yes, but the non-magicness is an important distinction here: It requires an explicit and deliberate call to the method, allowing the users to make an explicit choice of what recomposition is desired (normalized or raw for RFC 3986 and Ascii or Unicode for WHATWG). Similarly, Time\Instant (https://wiki.php.net/rfc/time_instant_class) will not be implementing __toString(). Best regards Tim Düsterhus

« previous php.internals (#132657) next »