Lines Matching refs:arg
772 PHPAPI long _php_math_basetolong(zval *arg, int base) in _php_math_basetolong() argument
778 if (Z_TYPE_P(arg) != IS_STRING || base < 2 || base > 36) { in _php_math_basetolong()
782 s = Z_STRVAL_P(arg); in _php_math_basetolong()
784 for (i = Z_STRLEN_P(arg); i > 0; i--) { in _php_math_basetolong()
817 PHPAPI int _php_math_basetozval(zval *arg, int base, zval *ret) in _php_math_basetozval() argument
827 if (Z_TYPE_P(arg) != IS_STRING || base < 2 || base > 36) { in _php_math_basetozval()
831 s = Z_STRVAL_P(arg); in _php_math_basetozval()
836 for (i = Z_STRLEN_P(arg); i > 0; i--) { in _php_math_basetozval()
881 PHPAPI char * _php_math_longtobase(zval *arg, int base) in _php_math_longtobase() argument
888 if (Z_TYPE_P(arg) != IS_LONG || base < 2 || base > 36) { in _php_math_longtobase()
892 value = Z_LVAL_P(arg); in _php_math_longtobase()
911 PHPAPI char * _php_math_zvaltobase(zval *arg, int base TSRMLS_DC) in _php_math_zvaltobase() argument
915 if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) { in _php_math_zvaltobase()
919 if (Z_TYPE_P(arg) == IS_DOUBLE) { in _php_math_zvaltobase()
920 double fvalue = floor(Z_DVAL_P(arg)); /* floor it just in case */ in _php_math_zvaltobase()
941 return _php_math_longtobase(arg, base); in _php_math_zvaltobase()
949 zval **arg; in PHP_FUNCTION() local
951 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
954 convert_to_string_ex(arg); in PHP_FUNCTION()
955 if (_php_math_basetozval(*arg, 2, return_value) == FAILURE) { in PHP_FUNCTION()
965 zval **arg; in PHP_FUNCTION() local
967 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
970 convert_to_string_ex(arg); in PHP_FUNCTION()
971 if (_php_math_basetozval(*arg, 16, return_value) == FAILURE) { in PHP_FUNCTION()
981 zval **arg; in PHP_FUNCTION() local
983 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
986 convert_to_string_ex(arg); in PHP_FUNCTION()
987 if (_php_math_basetozval(*arg, 8, return_value) == FAILURE) { in PHP_FUNCTION()
997 zval **arg; in PHP_FUNCTION() local
1000 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
1003 convert_to_long_ex(arg); in PHP_FUNCTION()
1004 result = _php_math_longtobase(*arg, 2); in PHP_FUNCTION()
1013 zval **arg; in PHP_FUNCTION() local
1016 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
1019 convert_to_long_ex(arg); in PHP_FUNCTION()
1020 result = _php_math_longtobase(*arg, 8); in PHP_FUNCTION()
1029 zval **arg; in PHP_FUNCTION() local
1032 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &arg) == FAILURE) { in PHP_FUNCTION()
1035 convert_to_long_ex(arg); in PHP_FUNCTION()
1036 result = _php_math_longtobase(*arg, 16); in PHP_FUNCTION()