From: Derick Rethans Date: Sat, 22 Dec 2001 11:53:29 +0000 (+0000) Subject: - Let ceil also return a float in every case X-Git-Tag: PRE_ISSET_PATCH~449 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8f3e3ffa00bc5672496315077b1532b56095580;p=php - Let ceil also return a float in every case --- 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;