Return to floorceil.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / math |
1.1 misho 1: --TEST-- 2: Tests for floor en ceil 3: --FILE-- 4: <?php 5: $a = ceil (-0); $b = ceil (-1); $c = ceil (-1.5); 6: $d = ceil (-1.8); $e = ceil (-2.7); 7: var_dump ($a, $b, $c, $d, $e); 8: 9: $a = ceil (0); $b = ceil (0.5); $c = ceil (1); 10: $d = ceil (1.5); $e = ceil (1.8); $f = ceil (2.7); 11: var_dump ($a, $b, $c, $d, $e, $f); 12: 13: $a = floor (-0); $b = floor (-0.5); $c = floor (-1); 14: $d = floor (-1.5); $e = floor (-1.8); $f = floor (-2.7); 15: var_dump ($a, $b, $c, $d, $e, $f); 16: 17: $a = floor (0); $b = floor (0.5); $c = floor (1); 18: $d = floor (1.5); $e = floor (1.8); $f = floor (2.7); 19: var_dump ($a, $b, $c, $d, $e, $f); 20: ?> 21: --EXPECT-- 22: float(0) 23: float(-1) 24: float(-1) 25: float(-1) 26: float(-2) 27: float(0) 28: float(1) 29: float(1) 30: float(2) 31: float(2) 32: float(3) 33: float(0) 34: float(-1) 35: float(-1) 36: float(-2) 37: float(-2) 38: float(-3) 39: float(0) 40: float(0) 41: float(1) 42: float(1) 43: float(1) 44: float(2)