Return the CURL version string. */
PHP_FUNCTION(curl_version)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
RETURN_STRING(curl_version(), 1);
}
/* }}} */
Describes the dbm-compatible library being used */
PHP_FUNCTION(dblist)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
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;
+
xmlXPathInit();
RETURN_TRUE;
}
FDFDoc fdf;
FDFErc err;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
err = FDFCreate(&fdf);
if(err != FDFErcOK || !fdf) {
#ifdef HAVE_GD_XPM
ret |= 16;
#endif
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
RETURN_LONG(ret);
}
/* }}} */
Returns object id of root collection */
PHP_FUNCTION(hw_root)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
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 (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;
+
RETURN_LONG(mhash_count());
}
int type;
int i;
int nument;
-
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
nument = zend_hash_next_free_element(&EG(regular_list));
/* Loop through list and close all statements */
char *tRes = NULL,
*buffer = NULL;
int ret = 0;
-
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
/**
* Make sure that we don't have more than one output buffer going on
* at the same time.
php_sablot *handle;
SablotHandle p;
int ret;
-
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
ret = SablotCreateProcessor(&p);
if (ret) {
int len;
char *enc;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
enc = php_session_encode(&len TSRMLS_CC);
RETVAL_STRINGL(enc, len, 0);
}
Begin session - reinitializes freezed variables, registers browsers etc */
PHP_FUNCTION(session_start)
{
+ /* skipping check for non-zero args for performance reasons here ?*/
php_session_start(TSRMLS_C);
RETURN_TRUE;
}
Destroy the current session and all data associated with it */
PHP_FUNCTION(session_destroy)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
if (php_session_destroy(TSRMLS_C) == SUCCESS) {
RETURN_TRUE;
} else {
Return the current status of quick_print */
PHP_FUNCTION(snmp_get_quick_print)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
RETURN_LONG(snmp_get_quick_print() ? 1 : 0);
}
/* }}} */
Return all objects including their respective object id withing the specified one */
PHP_FUNCTION(snmp_set_quick_print)
{
- zval **a1;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a1) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- convert_to_long_ex(a1);
- snmp_set_quick_print((int)(*a1)->value.lval);
+ int argc = ZEND_NUM_ARGS();
+ long a1;
+
+ 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;
+
php_fd = (php_fd_set*)emalloc(sizeof(php_fd_set));
FD_ZERO(&(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;
+
RETURN_STRING(php_get_current_user(), 1);
}
/* }}} */
Output a page of useful information about PHP and the current request */
PHP_FUNCTION(phpinfo)
{
- int flag;
- zval **flag_arg;
+ int argc = ZEND_NUM_ARGS();
+ long flag;
+ if (zend_parse_parameters(argc, "|l", &flag) == FAILURE)
+ return;
- switch (ZEND_NUM_ARGS()) {
- case 0:
- flag = 0xFFFFFFFF;
- break;
- case 1:
- if (zend_get_parameters_ex(1, &flag_arg)==FAILURE) {
- RETURN_FALSE;
- }
- convert_to_long_ex(flag_arg);
- flag = (*flag_arg)->value.lval;
- break;
- default:
- WRONG_PARAM_COUNT;
- break;
+ if(!argc) {
+ flag = 0xFFFFFFFF;
}
- php_print_info(flag TSRMLS_CC);
+
RETURN_TRUE;
}
Return the current PHP version */
PHP_FUNCTION(phpversion)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
RETURN_STRING(PHP_VERSION, 1);
}
/* }}} */
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
{
- int flag;
- zval **flag_arg;
+ int argc = ZEND_NUM_ARGS();
+ long flag;
+ if (zend_parse_parameters(argc, "|l", &flag) == FAILURE)
+ return;
+
+ if(!argc) {
+ flag = 0xFFFFFFFF;
+ }
- switch (ZEND_NUM_ARGS()) {
- case 0:
- flag = 0xFFFFFFFF;
- break;
- case 1:
- if (zend_get_parameters_ex(1, &flag_arg)==FAILURE) {
- RETURN_FALSE;
- }
- convert_to_long_ex(flag_arg);
- flag = (*flag_arg)->value.lval;
- break;
- default:
- WRONG_PARAM_COUNT;
- break;
- }
php_print_credits(flag);
RETURN_TRUE;
}
-
/* }}} */
/* {{{ proto string php_logo_guid(void)
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;
+
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;
+
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;
+
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 (sapi_module.name) {
RETURN_STRING(sapi_module.name, 1);
} else {
Return information about the system PHP was built on */
PHP_FUNCTION(php_uname)
{
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "") == FAILURE)
+ return;
+
RETURN_STRING(php_get_uname(), 0);
}