Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
| From: | Tim Düsterhus | Date: | Sun, 30 Mar 2025 11:12:09 +0000 |
| Subject: | Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126976@lists.php.net to get a copy of this message | ||
Hi
On 3/12/25 23:00, Máté Kocsis wrote:
I'm not sure if I'm entirely correct, but it's possible that a 3rd party URI implementation won't (or cannot) use PHP's memory manager, and it relies on the regular malloc: in this case, even memory errors could lead to failures.We already discussed this in private and the UriOperationException was removed from the RFC, but for public record: Something like a memory allocation error is not actionable by the user. Thus it should be an
Error (rather than an exception) or a bail out. Perhaps the engine will one day support gracefully handling the memory limit being exceeded with an OutOfMemoryError being thrown in that situation. Then it would also fit nicely for any URI implementation.
Best regards
Tim Düsterhus