mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Simplify code
This commit is contained in:
parent
a6a989d44c
commit
6f694fab9a
@ -880,9 +880,7 @@ PHP_FUNCTION(decbin)
|
||||
convert_to_long_ex(arg);
|
||||
|
||||
result = _php_math_longtobase(*arg, 2);
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = strlen(result);
|
||||
Z_STRVAL_P(return_value) = result;
|
||||
RETURN_STRING(result, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -900,9 +898,7 @@ PHP_FUNCTION(decoct)
|
||||
convert_to_long_ex(arg);
|
||||
|
||||
result = _php_math_longtobase(*arg, 8);
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = strlen(result);
|
||||
Z_STRVAL_P(return_value) = result;
|
||||
RETURN_STRING(result, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -920,9 +916,7 @@ PHP_FUNCTION(dechex)
|
||||
convert_to_long_ex(arg);
|
||||
|
||||
result = _php_math_longtobase(*arg, 16);
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = strlen(result);
|
||||
Z_STRVAL_P(return_value) = result;
|
||||
RETURN_STRING(result, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user