1--TEST--
2Test ceil() - basic function test for ceil()
3--INI--
4precision=14
5--SKIPIF--
6if (strtolower(PHP_OS) == 'darwin') {
7    die('SKIP OSX does weird things with -0 so this test doesn't work there');
8}
9--FILE--
10<?php
11/* Prototype  : float ceil  ( float $value  )
12 * Description: Round fractions up.
13 * Source code: ext/standard/math.c
14 */
15
16echo "*** Testing ceil() : basic functionality ***\n";
17$values = array(0,
18				-0,
19				0.5,
20				-0.5,
21				1,
22				-1,
23				1.5,
24				-1.5,
25				2.6,
26				-2.6,
27				037,
28				0x5F,
29				"10.5",
30				"-10.5",
31				"3.95E3",
32				"-3.95E3",
33				"039",
34				"0x5F",
35				true,
36				false,
37				null,
38				);
39
40for ($i = 0; $i < count($values); $i++) {
41	$res = ceil($values[$i]);
42	var_dump($res);
43}
44
45?>
46===Done===
47--EXPECTF--
48*** Testing ceil() : basic functionality ***
49float(0)
50float(0)
51float(1)
52float(-0)
53float(1)
54float(-1)
55float(2)
56float(-1)
57float(3)
58float(-2)
59float(31)
60float(95)
61float(11)
62float(-10)
63float(3950)
64float(-3950)
65float(39)
66float(95)
67float(1)
68float(0)
69float(0)
70===Done===
71