FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » signed int64 pack/unpack
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: signed int64 pack/unpack [message #184585 is a reply to message #184580] Sun, 12 January 2014 03:04 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 1/11/2014 9:46 PM, cameron7(at)gmail(dot)com wrote:
> Hi, yes, sorry I am running 64-bit OS and 64-bit PHP. PHP_INT_MAX is giving appropriate value.
>
> Specifics from `php -i`: PHP Version => 5.4.6-1ubuntu1.5
>
> The code has become extremely ugly, and still not working perfectly, thus the reason for trying to find others who may have experience with this. The pack / unpack functions don't provide support for 64-bit integers directly so I'm looking for at least a sound "hack".
>
> I've tried all sorts of things, from base_convert to simply trying to extract and iterate over a bitwise comparison against each bit in 4 separate 16-bit ints, but nothing I've tried so far is working correctly.
>
> Basically, the context for this is I'm writing a client for a custom protocol in which several of the components of that protocol in requests and responses require big endian 64-bit signed int, thus the reason for the need to pack / unpack.
>

That may be, but without knowing exactly what you're doing and what you
expect, any attempt to help you would be a waste of both your and our time.


--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how did I wind up with double headers?
Next Topic: Switch question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 08:40:26 GMT 2024

Total time taken to generate the page: 0.07396 seconds