php-src/ext/standard/tests/math/001.phpt
Jeroen van Wolffelaar c105f7142f Better abs() testing
2001-08-04 21:40:34 +00:00

32 lines
430 B
PHP

--TEST--
Simple math tests
--POST--
--GET--
--FILE--
<?php
echo abs(-1) . "\n";
echo abs(-1.5) . "\n";
echo abs("-1") . "\n";
echo abs("-1.5") . "\n";
echo abs(-2147483647) . "\n";
echo abs(-2147483648) . "\n";
echo abs(-2147483649) . "\n";
echo ceil(-1.5) . "\n";
echo ceil(1.5) . "\n";
echo floor(-1.5) . "\n";
echo floor(1.5) . "\n";
?>
--EXPECT--
1
1.5
1
1.5
2147483647
2147483648
2147483649
-1
2
-2
1