Protobuf\Binary\Platform\BigEndian::is32Bit PHP Method

is32Bit() public static method

public static is32Bit ( ) : boolean
return boolean
    public static function is32Bit()
    {
        if (self::$is32Bit !== null) {
            self::$is32Bit;
        }
        self::$is32Bit = PHP_INT_SIZE < 8;
        return self::$is32Bit;
    }

Usage Example

 public function testConstructInitializeGmpValues()
 {
     $encoder = new GmpNegativeEncoder();
     $gmp_x00 = $this->getPropertyValue($encoder, 'gmp_x00');
     $gmp_x7f = $this->getPropertyValue($encoder, 'gmp_x7f');
     $gmp_x80 = $this->getPropertyValue($encoder, 'gmp_x80');
     $gmp_xff = $this->getPropertyValue($encoder, 'gmp_xff');
     $gmp_x100 = $this->getPropertyValue($encoder, 'gmp_x100');
     $is32Bit = $this->getPropertyValue($encoder, 'is32Bit');
     $this->assertNotNull($gmp_x00);
     $this->assertNotNull($gmp_x7f);
     $this->assertNotNull($gmp_x80);
     $this->assertNotNull($gmp_xff);
     $this->assertNotNull($gmp_x100);
     $this->assertEquals(0, gmp_intval($gmp_x00));
     $this->assertEquals(127, gmp_intval($gmp_x7f));
     $this->assertEquals(128, gmp_intval($gmp_x80));
     $this->assertEquals(255, gmp_intval($gmp_xff));
     $this->assertEquals(256, gmp_intval($gmp_x100));
     $this->assertEquals(BigEndian::is32Bit(), $is32Bit);
 }
All Usage Examples Of Protobuf\Binary\Platform\BigEndian::is32Bit