Re: Endianness in PHP

From: Date: Thu, 12 Aug 2010 12:41:19 +0000
Subject: Re: Endianness in PHP
References: 1 2 3 4 5  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7475@lists.php.net to get a copy of this message
On 12 Aug 2010, at 12:48, Johannes Schlüter wrote: > Hi, > > On Thu, 2010-08-12 at 11:42 +0100, Melanie Rhianna Lewis wrote: >> You can easily detect endianness as follows: >> >> Either: > [...] > > Please don't reinvent the wheel. As said in my other mail we have a > compile time constant for this already. Sorry I missed that. However that's a compile time constant. Mine are run time. > And yes, for all circumstances a compile time value isn't enough. > Thinking about cross-compiling and MacOS's binaries which support > PowerPC and Intel architectures but using the provided constants gives a > consistent behavior. But are there mapping macros to aid endian translation? If not it would be nice if there were to save each extension that needs it re-inventing the wheel. Melanie

« previous php.pecl.dev (#7475) next »