Re: Re: [RFC] Add pack()/unpack() support for signed integers with specific endianness

From: Date: Wed, 05 Nov 2025 08:57:47 +0000
Subject: Re: 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-129085@lists.php.net to get a copy of this message
Hi, > It just adds the possibility of using <>. > I agree it's already tricky enough to get things right, which is _exactly_ why Tim's > approach is the right one. Instead of adding more arbitrarily chosen letters we now have a more > meaningful way to indicate endianness. It also is proven by Tim's patch that this isn't > hard to achieve. While implementation-wise adding some more letters is easier, Tim's patch > isn't really difficult anyway. So, if I get it right, you would both prefer a RFC proposing to add < and > for letters using machine endianness, with no effect on other letters (like Perl does)? I try to think about possible edge and error cases before what I really think about this proposition. If you have in mind tricky things that could be worth investigating deeper with implementing modifiers, please let me know. — Alexandre Daubois

« previous php.internals (#129085) next »