mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Fix for bug #14646, floor() always returns a float now.
This commit is contained in:
parent
ba1d89b386
commit
ca1bcd9ac3
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,6 @@ PHP_FUNCTION(ceil)
|
|||
/* }}} */
|
||||
/* {{{ proto float floor(float number)
|
||||
Returns the next lowest integer value from the number */
|
||||
|
||||
PHP_FUNCTION(floor)
|
||||
{
|
||||
zval **value;
|
||||
|
@ -96,7 +95,8 @@ PHP_FUNCTION(floor)
|
|||
if (Z_TYPE_PP(value) == IS_DOUBLE) {
|
||||
RETURN_DOUBLE(floor(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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue