1--TEST--
2BcMath\Number properties read
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7
8$values = [
9    '0',
10    '0.0',
11    '2',
12    '1234',
13    '12.0004',
14    '0.1230',
15    1,
16    12345,
17];
18
19foreach ($values as $value) {
20    $num = new BcMath\Number($value);
21    echo "value: {$num->value}\n";
22    echo "scale: {$num->scale}\n";
23    echo "\n";
24}
25?>
26--EXPECT--
27value: 0
28scale: 0
29
30value: 0.0
31scale: 1
32
33value: 2
34scale: 0
35
36value: 1234
37scale: 0
38
39value: 12.0004
40scale: 4
41
42value: 0.1230
43scale: 4
44
45value: 1
46scale: 0
47
48value: 12345
49scale: 0
50