Annotation of embedaddon/php/ext/standard/tests/math/round_modes.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: round() with different rounding modes
! 3: --FILE--
! 4: <?php
! 5: var_dump (round (2.5, 0, PHP_ROUND_HALF_UP));
! 6: var_dump (round (2.5, 0, PHP_ROUND_HALF_DOWN));
! 7: var_dump (round (2.5, 0, PHP_ROUND_HALF_EVEN));
! 8: var_dump (round (2.5, 0, PHP_ROUND_HALF_ODD));
! 9: var_dump (round (-2.5, 0, PHP_ROUND_HALF_UP));
! 10: var_dump (round (-2.5, 0, PHP_ROUND_HALF_DOWN));
! 11: var_dump (round (-2.5, 0, PHP_ROUND_HALF_EVEN));
! 12: var_dump (round (-2.5, 0, PHP_ROUND_HALF_ODD));
! 13: var_dump (round (3.5, 0, PHP_ROUND_HALF_UP));
! 14: var_dump (round (3.5, 0, PHP_ROUND_HALF_DOWN));
! 15: var_dump (round (3.5, 0, PHP_ROUND_HALF_EVEN));
! 16: var_dump (round (3.5, 0, PHP_ROUND_HALF_ODD));
! 17: var_dump (round (-3.5, 0, PHP_ROUND_HALF_UP));
! 18: var_dump (round (-3.5, 0, PHP_ROUND_HALF_DOWN));
! 19: var_dump (round (-3.5, 0, PHP_ROUND_HALF_EVEN));
! 20: var_dump (round (-3.5, 0, PHP_ROUND_HALF_ODD));
! 21: ?>
! 22: --EXPECT--
! 23: float(3)
! 24: float(2)
! 25: float(2)
! 26: float(3)
! 27: float(-3)
! 28: float(-2)
! 29: float(-2)
! 30: float(-3)
! 31: float(4)
! 32: float(3)
! 33: float(4)
! 34: float(3)
! 35: float(-4)
! 36: float(-3)
! 37: float(-4)
! 38: float(-3)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>