xref: /PHP-8.3/ext/bcmath/tests/bccomp.phpt (revision ee226128)
1--TEST--
2bccomp() function
3--EXTENSIONS--
4bcmath
5--INI--
6bcmath.scale=0
7--FILE--
8<?php
9echo bccomp("-1", "5", 4), "\n";
10echo bccomp("1928372132132819737213", "8728932001983192837219398127471"), "\n";
11echo bccomp("1.00000000000000000001", "1", 2), "\n";
12echo bccomp("97321", "2321"), "\n";
13echo bccomp("0", "14"), "\n";
14echo bccomp("1", "0"), "\n";
15echo bccomp("0.000", "0", 3), "\n";
16
17?>
18--EXPECT--
19-1
20-1
210
221
23-1
241
250
26