Hello all!
It all depends on usage of this function. My suggestion pointed to the
situation
when you have some structures inside binary stream (similar to C struct),
so you
have constant $format argument. The usage of '@' should be relative to the
start
of the parsing so it should start at the offset argument. That's completely
make
sense to me and I hope that the public will accept this in the same way.

Anyway, thank you all for solving this idea. It's made big impression to
me...

Regards, Hynek


On Thu, Feb 25, 2016 at 1:05 PM, Nikita Popov <nikita....@gmail.com> wrote:

> On Thu, Feb 25, 2016 at 8:08 AM, Dmitry Stogov <dmi...@zend.com> wrote:
>
>>
>>
>>
>> ________________________________
>> From: Dmitry Stogov
>> Sent: Wednesday, February 24, 2016 13:35
>> To: Hynek Bartoš; php-...@lists.php.net; php-general-h...@lists.php.net
>> Subject: Re: unpack()
>>
>>
>> Hi,
>>
>>
>> I think the requested feature may be really useful.
>>
>> And the implementation is really simple
>> https://gist.github.com/dstogov/edbb1efcd1e9701e75ab
>>
>> I think, committing this into master doesn't require RFC and voting.
>>
>> Anyone objects?
>>
>
> How should this interact with absolute position references? Your current
> patch changes input and inputlen, so absolute offsets will be relative to
> the "offset" parameter and not relative to the actual start of the string.
> Is this supposed to be so?
>
> And on that note, isn't this already covered by prefixing the unpack with
> @offset? (Not to say that an explicit offset argument wouldn't be more
> elegant.)
>
> Nikita
>

Reply via email to