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				true,
35				false,
36				null,
37				);
38
39for ($i = 0; $i < count($values); $i++) {
40	$res = ceil($values[$i]);
41	var_dump($res);
42}
43
44?>
45===Done===
46--EXPECT--
47*** Testing ceil() : basic functionality ***
48float(0)
49float(0)
50float(1)
51float(-0)
52float(1)
53float(-1)
54float(2)
55float(-1)
56float(3)
57float(-2)
58float(31)
59float(95)
60float(11)
61float(-10)
62float(3950)
63float(-3950)
64float(39)
65float(1)
66float(0)
67float(0)
68===Done===
69