Re: unpack() big endian signed long?

From: Date: Wed, 23 Jan 2008 21:14:25 +0000
Subject: Re: unpack() big endian signed long?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-267936@lists.php.net to get a copy of this message
On Jan 23, 2008 9:57 PM, Nathan Nobbe <quickshiftin@gmail.com> wrote: > On Jan 23, 2008 3:38 PM, Floor Terra <floort@gmail.com> wrote: > > > Hi, > > > > Is it possible to use unpack() to read a big endian signed long > > on a little endian machine? > > http://nl.php.net/pack refers to perl, on wich this > > function is based. > > The php function unpack() doesn't seem to support the "<" and > > ">" > > modifiers like perl does. > > > did you see this in the comments on that page? > Yes. I guess I'm stuck with manual byte reversing. Someone at ##php on freenode.org told me it is possible, but didn't tell me how. It seems like an obvious feature. Thanks for your time. Floor Terra

« previous php.general (#267936) next »