Exemple #1
0
 /**
  * Determines if the host platform can encode and decode long integer data.
  *
  * @throws AvroException if the platform cannot handle long integers.
  */
 private static function check_64_bit()
 {
     if (8 != PHP_INT_SIZE) {
         if (extension_loaded('gmp')) {
             self::$biginteger_mode = self::GMP_BIGINTEGER_MODE;
         } else {
             throw new AvroException('This platform cannot handle a 64-bit operations. ' . 'Please install the GMP PHP extension.');
         }
     } else {
         self::$biginteger_mode = self::PHP_BIGINTEGER_MODE;
     }
 }