mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
ee22612856
Add coverage for: * different formats of zero (0, 0.0) * small integers and decimals * large integers and large decimals with large fractional part * negative numbers for all of the above ones
25 lines
402 B
PHP
25 lines
402 B
PHP
--TEST--
|
|
bccomp() with negative value
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--INI--
|
|
bcmath.scale=0
|
|
--FILE--
|
|
<?php
|
|
echo bccomp("-2", "-2") . "\n";
|
|
echo bccomp("-2", "2", "1") . "\n";
|
|
echo bccomp("-2.29", "-2.3", "2") . "\n";
|
|
echo bccomp("-2.29", "2.3", "2") . "\n";
|
|
echo bccomp("2.29", "-2.3", "2") . "\n";
|
|
echo bccomp("-2.29", "-2.3", "1") . "\n";
|
|
echo bccomp("-2.29", "0", "1") . "\n";
|
|
?>
|
|
--EXPECT--
|
|
0
|
|
-1
|
|
1
|
|
-1
|
|
1
|
|
1
|
|
-1
|