src/Types/BigInteger.php
public function set($value)
    {
        static $hasGMP = null;

        if (null === $hasGMP) {
            $hasGMP = function_exists("gmp_init");
        }

        if (!$hasGMP) {
            throw new \RuntimeException("The GMP extension is required for this operation to work");
        }

        if (is_object($value) && $value instanceof \GMP) {
            // It is already a GMP integer.
        } else {
            $value = @gmp_init($value, 10);
        }

        if ($value === false) {
            throw new \InvalidArgumentException("A valid big integer was expected");
        }

        $this->value = $value;
    }
public function set($value)
    {
        static $hasGMP = null;

        if (null === $hasGMP) {
            $hasGMP = function_exists("gmp_init");
        }

        if (!$hasGMP) {
            throw new \RuntimeException("The GMP extension is required for this operation to work");
        }

        if (is_object($value) && $value instanceof \GMP) {
            // It is already a GMP integer.
        } else {
            $value = @gmp_init($value, 10);
        }

        if ($value === false) {
            throw new \InvalidArgumentException("A valid big integer was expected");
        }

        $this->value = $value;
    }
/ \copydoc fpoirotte::XRL::Types::AbstractType::set()