/hphp/test/zend/bad/ext/standard/tests/math/ceil_basic.php
PHP | 37 lines | 30 code | 3 blank | 4 comment | 1 complexity | e65fd0d67473135f5052422a15a7415e MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- /* Prototype : float ceil ( float $value )
- * Description: Round fractions up.
- * Source code: ext/standard/math.c
- */
- echo "*** Testing ceil() : basic functionality ***\n";
- $values = array(0,
- -0,
- 0.5,
- -0.5,
- 1,
- -1,
- 1.5,
- -1.5,
- 2.6,
- -2.6,
- 037,
- 0x5F,
- "10.5",
- "-10.5",
- "3.95E3",
- "-3.95E3",
- "039",
- "0x5F",
- true,
- false,
- null,
- );
- for ($i = 0; $i < count($values); $i++) {
- $res = ceil($values[$i]);
- var_dump($res);
- }
- ?>
- ===Done===