isLittleEndian() public static method

Determine if the current machine is little endian.
public static isLittleEndian ( ) : boolean
return boolean True if endianness is little endian, otherwise false.
Beispiel #1
0
 /**
  * Build an MAPI TZ blob given a TZ Offset hash.
  *
  * @param array $offsets  A TZ offset hash
  *
  * @return string  A base64_encoded MAPI Timezone structure suitable
  *                 for transmitting via wbxml.
  */
 public static function getSyncTZFromOffsets(array $offsets)
 {
     if (!Horde_Mapi::isLittleEndian()) {
         $offsets['bias'] = Horde_Mapi::chbo($offsets['bias']);
         $offsets['stdbias'] = Horde_Mapi::chbo($offsets['stdbias']);
         $offsets['dstbias'] = Horde_Mapi::chbo($offsets['dstbias']);
     }
     $packed = pack('la64vvvvvvvvla64vvvvvvvvl', $offsets['bias'], '', 0, $offsets['stdmonth'], $offsets['stdday'], $offsets['stdweek'], $offsets['stdhour'], $offsets['stdminute'], $offsets['stdsecond'], $offsets['stdmillis'], $offsets['stdbias'], '', 0, $offsets['dstmonth'], $offsets['dstday'], $offsets['dstweek'], $offsets['dsthour'], $offsets['dstminute'], $offsets['dstsecond'], $offsets['dstmillis'], $offsets['dstbias']);
     return base64_encode($packed);
 }