Return the CURL version string. */
PHP_FUNCTION(curl_version)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRING(curl_version(), 1);
}
Describes the dbm-compatible library being used */
PHP_FUNCTION(dblist)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
char *str = php_get_info_db();
RETURN_STRING(str, 1);
Initializing XPath environment */
PHP_FUNCTION(xpath_init)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
xmlXPathInit();
RETURN_TRUE;
FDFDoc fdf;
FDFErc err;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
err = FDFCreate(&fdf);
#ifdef HAVE_GD_XPM
ret |= 16;
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_LONG(ret);
}
Returns object id of root collection */
PHP_FUNCTION(hw_root)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
return_value->value.lval = 0;
return_value->type = IS_LONG;
Return error message */
PHP_FUNCTION(ibase_errmsg)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
if (IBG(errmsg[0])) {
RETURN_STRING(IBG(errmsg), 1);
Gets the number of available hashes */
PHP_FUNCTION(mhash_count)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_LONG(mhash_count());
}
int i;
int nument;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
nument = zend_hash_next_free_element(&EG(regular_list));
*buffer = NULL;
int ret = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
/**
* Make sure that we don't have more than one output buffer going on
}
/* }}} */
-
/* {{{ proto resource xslt_create(void)
Create a new XSL processor and return a resource identifier. */
PHP_FUNCTION(xslt_create)
SablotHandle p;
int ret;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
ret = SablotCreateProcessor(&p);
int len;
char *enc;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
enc = php_session_encode(&len TSRMLS_CC);
RETVAL_STRINGL(enc, len, 0);
Destroy the current session and all data associated with it */
PHP_FUNCTION(session_destroy)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
if (php_session_destroy(TSRMLS_C) == SUCCESS) {
RETURN_TRUE;
Return the current status of quick_print */
PHP_FUNCTION(snmp_get_quick_print)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_LONG(snmp_get_quick_print() ? 1 : 0);
}
if (zend_parse_parameters(argc, "l", &a1) == FAILURE)
return;
+
snmp_set_quick_print((int)a1);
}
/* }}} */
{
php_fd_set *php_fd;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
php_fd = (php_fd_set*)emalloc(sizeof(php_fd_set));
Get the name of the owner of the current PHP script */
PHP_FUNCTION(get_current_user)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRING(php_get_current_user(), 1);
}
}
/* }}} */
-
/* {{{ proto bool set_magic_quotes_runtime(int new_setting)
Set the current active configuration setting of magic_quotes_runtime and return previous */
PHP_FUNCTION(set_magic_quotes_runtime)
Return true if headers have already been sent, false otherwise */
PHP_FUNCTION(headers_sent)
{
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
+
if (SG(headers_sent)) {
RETURN_TRUE;
} else {
Return the current PHP version */
PHP_FUNCTION(phpversion)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRING(PHP_VERSION, 1);
}
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_logo_guid)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
}
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_egg_logo_guid)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRINGL(PHP_EGG_LOGO_GUID, sizeof(PHP_EGG_LOGO_GUID)-1, 1);
}
Return the special ID used to request the Zend logo in phpinfo screens*/
PHP_FUNCTION(zend_logo_guid)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
}
Return the current SAPI module name */
PHP_FUNCTION(php_sapi_name)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
if (sapi_module.name) {
RETURN_STRING(sapi_module.name, 1);
Return information about the system PHP was built on */
PHP_FUNCTION(php_uname)
{
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
- return;
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
RETURN_STRING(php_get_uname(), 0);
}
Returns the maximum value a random number can have */
PHP_FUNCTION(getrandmax)
{
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
+
return_value->type = IS_LONG;
return_value->value.lval = PHP_RAND_MAX;
}
Returns the maximum value a random number from Mersenne Twister can have */
PHP_FUNCTION(mt_getrandmax)
{
+ if (ZEND_NUM_ARGS() != 0) {
+ WRONG_PARAM_COUNT;
+ }
+
return_value->type = IS_LONG;
/*
* Melo: it could be 2^^32 but we only use 2^^31 to maintain