Re: [RFC] Add pack()/unpack() support for signed integers with specific endianness
| From: | Rob Landers | Date: | Wed, 24 Sep 2025 21:45:21 +0000 |
| Subject: | Re: [RFC] Add pack()/unpack() support for signed integers with specific endianness | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128723@lists.php.net to get a copy of this message | ||
On Wed, Sep 24, 2025, at 09:28, Alexandre Daubois wrote:
> Hi,
>
> > I'm proposing to introduce the
< and
> > > modifiers, following Perl's
> > lead. This would then allow to deprecate e, E, g, and G in a future
> > version and if / when that happens, PHP would be in sync with Perl
> > again. I'm not proposing that the deprecation should happen at the same
> > time, because folks should have at least one PHP version to migrate
> > where the new logic is available, but the old is not yet deprecated.
>
> That would be an interesting addition. Given that only those 4 have
> diverged from Perl, that could be great to sync them again. Let's wait
> for other inputs to see if someone agrees with the idea before
> potentially revamping the RFC. I personally like it.
>
> — Alexandre Daubois
>
Hi,
I like the idea of following Perl, but also I have some concerns:
1. It will make it hard or impossible to justify adding something to PHP that isn’t in Perl. The
fact that they’re different is a boon and a curse. That being said, nobody has really changed this
or proposed anything PHP specific in a long time.
2. This is a pretty breaking change, so will it have to land in PHP 9.0
3. Which begs the question, what will be the next version of PHP? 9.0 or 8.6?
— Rob