Re: Proposal: Support for RFC4648 in PHP
| From: | Hans Henrik Bergan | Date: | Thu, 12 Jun 2025 17:22:46 +0000 |
| Subject: | Re: Proposal: Support for RFC4648 in PHP | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127657@lists.php.net to get a copy of this message | ||
On Thu, 12 Jun 2025 at 18:53, ignace nyamagana butera
<nyamsprod@gmail.com> wrote:
>
> Greetings,
>
> I have been playing around with an RFC proposal for some time and recently after discussing it
> with Tim Düsterhus he has volunteered
> to do the implementation so I would like to submit to you an RFC around data encoding in PHP.
> The goal of the RFC is to fully implement
> RFC4648 (base16 , base32, base64).
>
> I know that PHP already has
base64_encode and
> base64_decode and bih2hex and
> hex2bin but those functions only provide a partial support for
> RFC4648.
> In my RFC proposal I would like to introduce, instead, a new namespace Ðóùq;œ
> Úûê�LzüEncoding that will host an all new and improved API which will cover the
> complete RFC,
> will be consistent and easily extendable for future data encoding algorithms addition.
>
> For reference, this is not a new topic, the issue with the current implementation is well
> documented in the mailing list as well as a past attempt to
> add RFC4648 to the language.
>
> - base64_encode without padding
> https://externals.io/message/122630
> - base64 url format https://externals.io/message/119243
> - [RFC] RFC4648 encoding
> https://externals.io/message/91858#91964
>
> If people are interested I will proceed with a karma request and create the draft RFC.
>
> Best regards,
> Ignace Nyamagana Butera
Why do it in core?
Is userland base16/base32 performance unsatisfactory?