isBigEndian() public static method

Check if the current architecture is Big Endian.
public static isBigEndian ( ) : boolean
return boolean
Esempio n. 1
0
 public function testIsBigEndian()
 {
     list(, $result) = unpack('L', pack('V', 1));
     $actual = BigEndian::isBigEndian();
     $expected = $result !== 1;
     $this->assertEquals($expected, $actual);
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * @param \Protobuf\Configuration $config
  */
 public function __construct(Configuration $config)
 {
     $this->config = $config;
     $this->isBigEndian = BigEndian::isBigEndian();
     $this->negativeEncoder = $config->getPlatformFactory()->getNegativeEncoder();
 }
Esempio n. 3
0
 /**
  * Constructor
  *
  * @param \Protobuf\Configuration $config
  */
 public function __construct(Configuration $config)
 {
     $this->config = $config;
     $this->isBigEndian = BigEndian::isBigEndian();
 }