Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BigInteger.php

function BigInteger::zero

Returns a BigInteger representing zero.

@psalm-pure

5 calls to BigInteger::zero()
BigInteger::fromBase in vendor/brick/math/src/BigInteger.php
Creates a number from a string in a given base.
BigInteger::modInverse in vendor/brick/math/src/BigInteger.php
Returns the modular multiplicative inverse of this BigInteger modulo $m.
BigInteger::randomBits in vendor/brick/math/src/BigInteger.php
Generates a pseudo-random number in the range 0 to 2^numBits - 1.
BigInteger::remainder in vendor/brick/math/src/BigInteger.php
Returns the remainder of the division of this number by the given one.
BigRational::zero in vendor/brick/math/src/BigRational.php
Returns a BigRational representing zero.

File

vendor/brick/math/src/BigInteger.php, line 287

Class

BigInteger
An arbitrary-size integer.

Namespace

Brick\Math

Code

public static function zero() : BigInteger {
    
    /**
     * @psalm-suppress ImpureStaticVariable
     * @var BigInteger|null $zero
     */
    static $zero;
    if ($zero === null) {
        $zero = new BigInteger('0');
    }
    return $zero;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal