Lines Matching refs:base
42 ZEND_ARG_INFO(0, base)
63 ZEND_ARG_INFO(0, base)
82 ZEND_ARG_INFO(0, base)
87 ZEND_ARG_INFO(0, base)
336 static void gmp_strval(zval *result, mpz_t gmpnum, int base);
337 static int convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base);
724 static int convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base) in convert_to_gmp() argument
739 if ((base == 0 || base == 16) && (numstr[1] == 'x' || numstr[1] == 'X')) { in convert_to_gmp()
740 base = 16; in convert_to_gmp()
742 } else if ((base == 0 || base == 2) && (numstr[1] == 'b' || numstr[1] == 'B')) { in convert_to_gmp()
743 base = 2; in convert_to_gmp()
748 ret = mpz_set_str(gmpnumber, (skip_lead ? &numstr[2] : numstr), (int) base); in convert_to_gmp()
765 static void gmp_strval(zval *result, mpz_t gmpnum, int base) /* {{{ */ in gmp_strval() argument
770 num_len = mpz_sizeinbase(gmpnum, abs(base)); in gmp_strval()
776 mpz_get_str(ZSTR_VAL(str), base, gmpnum); in gmp_strval()
1044 zend_long base = 0; in ZEND_FUNCTION() local
1046 if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &number_arg, &base) == FAILURE) { in ZEND_FUNCTION()
1050 if (base && (base < 2 || base > GMP_MAX_BASE)) { in ZEND_FUNCTION()
1051 …NG, "Bad base for conversion: " ZEND_LONG_FMT " (should be between 2 and %d)", base, GMP_MAX_BASE); in ZEND_FUNCTION()
1056 if (convert_to_gmp(gmpnumber, number_arg, base) == FAILURE) { in ZEND_FUNCTION()
1197 zend_long base = 10; in ZEND_FUNCTION() local
1201 if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &gmpnumber_arg, &base) == FAILURE) { in ZEND_FUNCTION()
1207 if ((base < 2 && base > -2) || base > GMP_MAX_BASE || base < -36) { in ZEND_FUNCTION()
1208 …for conversion: " ZEND_LONG_FMT " (should be between 2 and %d or -2 and -36)", base, GMP_MAX_BASE); in ZEND_FUNCTION()
1214 gmp_strval(return_value, gmpnum, (int)base); in ZEND_FUNCTION()