File: bcmath.stub.php

package info (click to toggle)
php8.4 8.4.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208,108 kB
  • sloc: ansic: 1,060,628; php: 35,345; sh: 11,866; cpp: 7,201; pascal: 4,913; javascript: 3,091; asm: 2,810; yacc: 2,411; makefile: 689; xml: 446; python: 301; awk: 148
file content (96 lines) | stat: -rw-r--r-- 2,963 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php

/** @generate-class-entries */

namespace
{
    /** @refcount 1 */
    function bcadd(string $num1, string $num2, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcsub(string $num1, string $num2, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcmul(string $num1, string $num2, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcdiv(string $num1, string $num2, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcmod(string $num1, string $num2, ?int $scale = null): string {}

    /**
     * @return string[]
     * @refcount 1
     */
    function bcdivmod(string $num1, string $num2, ?int $scale = null): array {}

    /** @refcount 1 */
    function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcpow(string $num, string $exponent, ?int $scale = null): string {}

    /** @refcount 1 */
    function bcsqrt(string $num, ?int $scale = null): string {}

    function bccomp(string $num1, string $num2, ?int $scale = null): int {}

    function bcscale(?int $scale = null): int {}

    /** @refcount 1 */
    function bcfloor(string $num): string {}

    /** @refcount 1 */
    function bcceil(string $num): string {}

    /** @refcount 1 */
    function bcround(string $num, int $precision = 0, RoundingMode $mode = RoundingMode::HalfAwayFromZero): string {}
}

namespace BcMath
{
    /** @strict-properties */
    final readonly class Number implements \Stringable
    {
        /** @virtual */
        public string $value;
        /** @virtual */
        public int $scale;

        public function __construct(string|int $num) {}

        public function add(Number|string|int $num, ?int $scale = null): Number {}

        public function sub(Number|string|int $num, ?int $scale = null): Number {}

        public function mul(Number|string|int $num, ?int $scale = null): Number {}

        public function div(Number|string|int $num, ?int $scale = null): Number {}

        public function mod(Number|string|int $num, ?int $scale = null): Number {}

        /** @return Number[] */
        public function divmod(Number|string|int $num, ?int $scale = null): array {}

        public function powmod(Number|string|int $exponent, Number|string|int $modulus, ?int $scale = null): Number {}

        public function pow(Number|string|int $exponent, ?int $scale = null): Number {}

        public function sqrt(?int $scale = null): Number {}

        public function floor(): Number {}

        public function ceil(): Number {}

        public function round(int $precision = 0, \RoundingMode $mode = \RoundingMode::HalfAwayFromZero): Number {}

        public function compare(Number|string|int $num, ?int $scale = null): int {}

        public function __toString(): string {}

        public function __serialize(): array {}

        public function __unserialize(array $data): void {}
    }
}