Skip to content

Commit 2b5fda8

Browse files
committed
Add frameless dechex handler
1 parent e19225c commit 2b5fda8

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3204,6 +3204,7 @@ function decoct(int $num): string {}
32043204
/**
32053205
* @compile-time-eval
32063206
* @refcount 1
3207+
* @frameless-function {"arity": 1}
32073208
*/
32083209
function dechex(int $num): string {}
32093210

ext/standard/basic_functions_arginfo.h

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/standard/math.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,17 @@ PHP_FUNCTION(dechex)
10231023
}
10241024
/* }}} */
10251025

1026+
ZEND_FRAMELESS_FUNCTION(dechex, 1)
1027+
{
1028+
zend_long arg;
1029+
1030+
Z_FLF_PARAM_LONG(1, arg);
1031+
1032+
RETVAL_STR(_php_math_longtobase_pwr2(arg, 4));
1033+
1034+
flf_clean:;
1035+
}
1036+
10261037
/* {{{ Converts a number in a string from any base <= 36 to any base <= 36 */
10271038
PHP_FUNCTION(base_convert)
10281039
{

0 commit comments

Comments
 (0)