1--TEST--
2BcMath\Number floor()
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7$nums = [
8    '0',
9    '0.00',
10    '-0',
11    '-0.00',
12    '0.01',
13    '0.000000000000000000000000000000000000000001',
14    '-0.01',
15    '-0.000000000000000000000000000000000000000001',
16    '1',
17    '1.0000',
18    '1.0001',
19    '100000.000000000000000000000000000000000000000001',
20    '-1',
21    '-1.0000',
22    '-1.0001',
23    '-100000.000000000000000000000000000000000000000001',
24];
25
26foreach ($nums as $num) {
27    $func_ret = bcfloor($num);
28    $method_ret = (new BcMath\Number($num))->floor();
29    if ($method_ret->compare($func_ret) !== 0) {
30        echo "Result is incorrect.\n";
31        var_dump($num, $func_ret, $method_ret);
32    }
33}
34echo 'done!';
35?>
36--EXPECT--
37done!
38