Re: [RFC] Throw ValueError for invalid characters in number base functions

From: Date: Thu, 24 Sep 2026 08:07:55 +0000
Subject: Re: [RFC] Throw ValueError for invalid characters in number base functions
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-132615@lists.php.net to get a copy of this message
On Thu, 24 Sept 2026 at 09:50, Sjoerd Langkemper <sjoerd-php@linuxonly.nl> wrote: > On Fri, Sep 4, 2026, at 16:38, Tim Düsterhus wrote: > > I would probably make this > a conservative change and go with the plain \Exception > exception > directly. > > > Thanks. I changed the RFC to propose throwing an Exception instead of a > ValueError: > > https://wiki.php.net/rfc/throw_error_for_invalid_characters_for_number_base > > Regards, > > Sjoerd > Hello, throwing an Exception is in the correct direction. However, would it be possible to have some more specific exception type? \UnexpectedValueException looks like a good candidate. Kind regards, Lazare

« previous php.internals (#132615) next »