diff options
author | Derick Rethans <derick@php.net> | 2001-12-22 11:53:29 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2001-12-22 11:53:29 +0000 |
commit | e8f3e3ffa00bc5672496315077b1532b56095580 (patch) | |
tree | 9c1632916862a7e1383f424a354d501ce1b7f9a2 /ext/standard/math.c | |
parent | 6729156450ceff79f8db05f03f454ed3a5b3700a (diff) | |
download | php-git-e8f3e3ffa00bc5672496315077b1532b56095580.tar.gz |
- Let ceil also return a float in every case
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r-- | ext/standard/math.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c index ba1df9937d..9b9fdc838c 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -73,7 +73,8 @@ PHP_FUNCTION(ceil) if (Z_TYPE_PP(value) == IS_DOUBLE) { RETURN_DOUBLE(ceil(Z_DVAL_PP(value))); } else if (Z_TYPE_PP(value) == IS_LONG) { - RETURN_LONG(Z_LVAL_PP(value)); + convert_to_double_ex(value); + RETURN_DOUBLE(Z_DVAL_PP(value)); } RETURN_FALSE; |