]> granicus.if.org Git - php/commitdiff
Add stubs for some SAPIs
authorMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 14 May 2020 11:31:52 +0000 (13:31 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 14 May 2020 11:35:12 +0000 (13:35 +0200)
For apache2handler, fpm, litespeed, phpdbg, specifically.
Partially implements GH-5295

15 files changed:
ext/standard/dl.c
ext/standard/dl.stub.php [new file with mode: 0644]
ext/standard/dl_arginfo.h [new file with mode: 0644]
sapi/apache2handler/php_functions.c
sapi/apache2handler/php_functions.stub.php
sapi/apache2handler/php_functions_arginfo.h
sapi/fpm/fpm/fpm_main.c
sapi/fpm/fpm/fpm_main.stub.php [new file with mode: 0644]
sapi/fpm/fpm/fpm_main_arginfo.h [new file with mode: 0644]
sapi/litespeed/lsapi_main.c
sapi/litespeed/lsapi_main.stub.php [new file with mode: 0644]
sapi/litespeed/lsapi_main_arginfo.h [new file with mode: 0644]
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg.stub.php
sapi/phpdbg/phpdbg_arginfo.h

index 1edfb944fc403db9a3a6bdf32c09845579ffd2c5..ed387761a84f3dae528bcc2616adbd2053467dbc 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 #endif /* defined(HAVE_LIBDL) */
 
-/* {{{ proto int dl(string extension_filename)
+/* {{{ proto bool dl(string extension_filename)
    Load a PHP extension at runtime */
 PHPAPI PHP_FUNCTION(dl)
 {
diff --git a/ext/standard/dl.stub.php b/ext/standard/dl.stub.php
new file mode 100644 (file)
index 0000000..d712914
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+function dl(string $extension_filename): bool {}
diff --git a/ext/standard/dl_arginfo.h b/ext/standard/dl_arginfo.h
new file mode 100644 (file)
index 0000000..b1adadf
--- /dev/null
@@ -0,0 +1,5 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dl, 0, 1, _IS_BOOL, 0)
+       ZEND_ARG_TYPE_INFO(0, extension_filename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
index d1aa2d587c4d148ca762115d637824e4eff279c2..5c9e03a1f84560d0c0380097f237ea5b9677ab69 100644 (file)
@@ -476,20 +476,6 @@ PHP_MINFO_FUNCTION(apache)
        }
 }
 
-static const zend_function_entry apache_functions[] = {
-       PHP_FE(apache_lookup_uri,               arginfo_apache_lookup_uri)
-       PHP_FE(virtual,                                 arginfo_virtual)
-       PHP_FE(apache_request_headers,  arginfo_apache_request_headers)
-       PHP_FE(apache_response_headers, arginfo_apache_response_headers)
-       PHP_FE(apache_setenv,           arginfo_apache_setenv)
-       PHP_FE(apache_getenv,           arginfo_apache_getenv)
-       PHP_FE(apache_note,             arginfo_apache_note)
-       PHP_FE(apache_get_version,      arginfo_apache_get_version)
-       PHP_FE(apache_get_modules,      arginfo_apache_get_modules)
-       PHP_FALIAS(getallheaders,       apache_request_headers, arginfo_getallheaders)
-       {NULL, NULL, NULL}
-};
-
 PHP_INI_BEGIN()
        STD_PHP_INI_ENTRY("xbithack",           "0",    PHP_INI_ALL,    OnUpdateBool,   xbithack,       php_apache2_info_struct, php_apache2_info)
        STD_PHP_INI_ENTRY("engine",             "1",    PHP_INI_ALL,    OnUpdateBool,   engine,         php_apache2_info_struct, php_apache2_info)
@@ -514,7 +500,7 @@ static PHP_MSHUTDOWN_FUNCTION(apache)
 zend_module_entry php_apache_module = {
        STANDARD_MODULE_HEADER,
        "apache2handler",
-       apache_functions,
+       ext_functions,
        PHP_MINIT(apache),
        PHP_MSHUTDOWN(apache),
        NULL,
index 5b2835ac3a9dbd017053219425b8d7d8b9b39f04..391600be6ca60d50e684dd9499c7d38e0a55e5b9 100644 (file)
@@ -1,11 +1,14 @@
 <?php
 
+/** @generate-function-entries */
+
 function apache_lookup_uri(string $filename): object|false {}
 
 function virtual(string $uri): bool {}
 
 function apache_request_headers(): array {}
 
+/** @alias apache_request_headers */
 function getallheaders(): array {}
 
 function apache_response_headers(): array {}
index a99296abb0d9e21f0444d044d9712994fdcbe869..739afbbc8b7c98018ed95ddbc0fb00ec7b6a3840 100644 (file)
@@ -35,3 +35,29 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_apache_get_version, 0, 0, MAY_BE
 ZEND_END_ARG_INFO()
 
 #define arginfo_apache_get_modules arginfo_apache_request_headers
+
+
+ZEND_FUNCTION(apache_lookup_uri);
+ZEND_FUNCTION(virtual);
+ZEND_FUNCTION(apache_request_headers);
+ZEND_FUNCTION(apache_response_headers);
+ZEND_FUNCTION(apache_note);
+ZEND_FUNCTION(apache_setenv);
+ZEND_FUNCTION(apache_getenv);
+ZEND_FUNCTION(apache_get_version);
+ZEND_FUNCTION(apache_get_modules);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(apache_lookup_uri, arginfo_apache_lookup_uri)
+       ZEND_FE(virtual, arginfo_virtual)
+       ZEND_FE(apache_request_headers, arginfo_apache_request_headers)
+       ZEND_FALIAS(getallheaders, apache_request_headers, arginfo_getallheaders)
+       ZEND_FE(apache_response_headers, arginfo_apache_response_headers)
+       ZEND_FE(apache_note, arginfo_apache_note)
+       ZEND_FE(apache_setenv, arginfo_apache_setenv)
+       ZEND_FE(apache_getenv, arginfo_apache_getenv)
+       ZEND_FE(apache_get_version, arginfo_apache_get_version)
+       ZEND_FE(apache_get_modules, arginfo_apache_get_modules)
+       ZEND_FE_END
+};
index 8fab8d6bd27d638e4a6da56d8ab503d7d6a6b960..0d508dd04be9d4902d4612565a98408cb770415f 100644 (file)
@@ -82,6 +82,7 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS;
 
 #include <php_config.h>
 #include "fpm.h"
+#include "fpm_main_arginfo.h"
 #include "fpm_request.h"
 #include "fpm_status.h"
 #include "fpm_signals.h"
@@ -1457,9 +1458,6 @@ static PHP_MINFO_FUNCTION(cgi)
 }
 /* }}} */
 
-ZEND_BEGIN_ARG_INFO(cgi_fcgi_sapi_no_arginfo, 0)
-ZEND_END_ARG_INFO()
-
 PHP_FUNCTION(fastcgi_finish_request) /* {{{ */
 {
        fcgi_request *request = (fcgi_request*) SG(server_context);
@@ -1510,18 +1508,10 @@ PHP_FUNCTION(fpm_get_status) /* {{{ */
 }
 /* }}} */
 
-static const zend_function_entry cgi_fcgi_sapi_functions[] = {
-       PHP_FE(fastcgi_finish_request,                    cgi_fcgi_sapi_no_arginfo)
-       PHP_FE(fpm_get_status,                            cgi_fcgi_sapi_no_arginfo)
-       PHP_FE(apache_request_headers,                    cgi_fcgi_sapi_no_arginfo)
-       PHP_FALIAS(getallheaders, apache_request_headers, cgi_fcgi_sapi_no_arginfo)
-       PHP_FE_END
-};
-
 static zend_module_entry cgi_module_entry = {
        STANDARD_MODULE_HEADER,
        "cgi-fcgi",
-       cgi_fcgi_sapi_functions,
+       ext_functions,
        PHP_MINIT(cgi),
        PHP_MSHUTDOWN(cgi),
        NULL,
diff --git a/sapi/fpm/fpm/fpm_main.stub.php b/sapi/fpm/fpm/fpm_main.stub.php
new file mode 100644 (file)
index 0000000..5d1883c
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+/** @generate-function-entries */
+
+function fastcgi_finish_request(): bool {}
+
+function apache_request_headers(): array {}
+
+/** @alias apache_request_headers */
+function getallheaders(): array {}
+
+function fpm_get_status(): array|false {}
diff --git a/sapi/fpm/fpm/fpm_main_arginfo.h b/sapi/fpm/fpm/fpm_main_arginfo.h
new file mode 100644 (file)
index 0000000..52e34d4
--- /dev/null
@@ -0,0 +1,26 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fastcgi_finish_request, 0, 0, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_apache_request_headers, 0, 0, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_getallheaders arginfo_apache_request_headers
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_fpm_get_status, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(fastcgi_finish_request);
+ZEND_FUNCTION(apache_request_headers);
+ZEND_FUNCTION(fpm_get_status);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(fastcgi_finish_request, arginfo_fastcgi_finish_request)
+       ZEND_FE(apache_request_headers, arginfo_apache_request_headers)
+       ZEND_FALIAS(getallheaders, apache_request_headers, arginfo_getallheaders)
+       ZEND_FE(fpm_get_status, arginfo_fpm_get_status)
+       ZEND_FE_END
+};
index 186558a32589992cff57eab439a8f253974be636..1a6527a68b659773bb4e1cf0d47221e0d165b4c2 100644 (file)
@@ -24,6 +24,7 @@
 #include "ext/standard/basic_functions.h"
 #include "ext/standard/info.h"
 #include "lsapilib.h"
+#include "lsapi_main_arginfo.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1615,11 +1616,6 @@ int main( int argc, char * argv[] )
 
 /*   LiteSpeed PHP module starts here */
 
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO(arginfo_litespeed__void, 0)
-ZEND_END_ARG_INFO()
-/* }}} */
-
 PHP_FUNCTION(litespeed_request_headers);
 PHP_FUNCTION(litespeed_response_headers);
 PHP_FUNCTION(apache_get_modules);
@@ -1627,17 +1623,6 @@ PHP_FUNCTION(litespeed_finish_request);
 
 PHP_MINFO_FUNCTION(litespeed);
 
-static const zend_function_entry litespeed_functions[] = {
-    PHP_FE(litespeed_request_headers,   arginfo_litespeed__void)
-    PHP_FE(litespeed_response_headers,  arginfo_litespeed__void)
-    PHP_FE(apache_get_modules,          arginfo_litespeed__void)
-    PHP_FE(litespeed_finish_request,    arginfo_litespeed__void)
-    PHP_FALIAS(getallheaders,           litespeed_request_headers,  arginfo_litespeed__void)
-    PHP_FALIAS(apache_request_headers,  litespeed_request_headers,  arginfo_litespeed__void)
-    PHP_FALIAS(apache_response_headers, litespeed_response_headers, arginfo_litespeed__void)
-    {NULL, NULL, NULL}
-};
-
 static PHP_MINIT_FUNCTION(litespeed)
 {
     user_config_cache_init();
@@ -1675,7 +1660,7 @@ static PHP_MSHUTDOWN_FUNCTION(litespeed)
 zend_module_entry litespeed_module_entry = {
     STANDARD_MODULE_HEADER,
     "litespeed",
-    litespeed_functions,
+    ext_functions,
     PHP_MINIT(litespeed),
     PHP_MSHUTDOWN(litespeed),
     NULL,
@@ -1697,14 +1682,13 @@ static int add_associate_array( const char * pKey, int keyLen, const char * pVal
    Fetch all HTTP request headers */
 PHP_FUNCTION(litespeed_request_headers)
 {
-    /* TODO: */
-    if (ZEND_NUM_ARGS() > 0) {
-        WRONG_PARAM_COUNT;
+    if (zend_parse_parameters_none() == FAILURE) {
+        RETURN_THROWS();
     }
+
     array_init(return_value);
 
     LSAPI_ForeachOrgHeader( add_associate_array, return_value );
-
 }
 /* }}} */
 
@@ -1720,9 +1704,9 @@ PHP_FUNCTION(litespeed_response_headers)
     int          len;
     char         headerBuf[SAPI_LSAPI_MAX_HEADER_LENGTH];
 
-    if (ZEND_NUM_ARGS() > 0) {
-        WRONG_PARAM_COUNT;
-    }
+    if (zend_parse_parameters_none() == FAILURE) {
+               RETURN_THROWS();
+       }
 
     if (!&SG(sapi_headers).headers) {
         RETURN_FALSE;
@@ -1762,10 +1746,11 @@ PHP_FUNCTION(apache_get_modules)
         "mod_rewrite", "mod_mime", "mod_headers", "mod_expires", "mod_auth_basic", NULL
     };
     const char **name = mod_names;
-    /* TODO: */
-    if (ZEND_NUM_ARGS() > 0) {
-        WRONG_PARAM_COUNT;
-    }
+
+    if (zend_parse_parameters_none() == FAILURE) {
+               RETURN_THROWS();
+       }
+
     array_init(return_value);
     while( *name )
     {
@@ -1776,13 +1761,13 @@ PHP_FUNCTION(apache_get_modules)
 /* }}} */
 
 
-/* {{{ proto array litespeed_finish_request(void)
+/* {{{ proto bool litespeed_finish_request(void)
    Flushes all response data to the client */
 PHP_FUNCTION(litespeed_finish_request)
 {
-    if (ZEND_NUM_ARGS() > 0) {
-        WRONG_PARAM_COUNT;
-    }
+       if (zend_parse_parameters_none() == FAILURE) {
+               RETURN_THROWS();
+       }
 
     php_output_end_all();
     php_header();
diff --git a/sapi/litespeed/lsapi_main.stub.php b/sapi/litespeed/lsapi_main.stub.php
new file mode 100644 (file)
index 0000000..396cb86
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+/** @generate-function-entries */
+
+function litespeed_request_headers(): array {}
+
+/** @alias litespeed_request_headers */
+function getallheaders(): array {}
+
+/** @alias litespeed_request_headers */
+function apache_request_headers(): array {}
+
+function litespeed_response_headers(): array|false {}
+
+/** @alias litespeed_response_headers */
+function apache_response_headers(): array|false {}
+
+function apache_get_modules(): array {}
+
+function litespeed_finish_request(): bool {}
diff --git a/sapi/litespeed/lsapi_main_arginfo.h b/sapi/litespeed/lsapi_main_arginfo.h
new file mode 100644 (file)
index 0000000..4198c43
--- /dev/null
@@ -0,0 +1,36 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_litespeed_request_headers, 0, 0, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_getallheaders arginfo_litespeed_request_headers
+
+#define arginfo_apache_request_headers arginfo_litespeed_request_headers
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_litespeed_response_headers, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
+ZEND_END_ARG_INFO()
+
+#define arginfo_apache_response_headers arginfo_litespeed_response_headers
+
+#define arginfo_apache_get_modules arginfo_litespeed_request_headers
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_litespeed_finish_request, 0, 0, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(litespeed_request_headers);
+ZEND_FUNCTION(litespeed_response_headers);
+ZEND_FUNCTION(apache_get_modules);
+ZEND_FUNCTION(litespeed_finish_request);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(litespeed_request_headers, arginfo_litespeed_request_headers)
+       ZEND_FALIAS(getallheaders, litespeed_request_headers, arginfo_getallheaders)
+       ZEND_FALIAS(apache_request_headers, litespeed_request_headers, arginfo_apache_request_headers)
+       ZEND_FE(litespeed_response_headers, arginfo_litespeed_response_headers)
+       ZEND_FALIAS(apache_response_headers, litespeed_response_headers, arginfo_apache_response_headers)
+       ZEND_FE(apache_get_modules, arginfo_apache_get_modules)
+       ZEND_FE(litespeed_finish_request, arginfo_litespeed_finish_request)
+       ZEND_FE_END
+};
index b85536c97143625abf9f7d98edc9d5aa45a4c5eb..3116e45045f5feebb56876afa2895be13fcef72a 100644 (file)
@@ -291,7 +291,7 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */
        If the execution context was set previously it is returned
        If the execution context was not set previously boolean true is returned
        If the request to set the context fails, boolean false is returned, and an E_WARNING raised */
-static PHP_FUNCTION(phpdbg_exec)
+PHP_FUNCTION(phpdbg_exec)
 {
        zend_string *exec;
 
@@ -331,7 +331,7 @@ static PHP_FUNCTION(phpdbg_exec)
 
 /* {{{ proto void phpdbg_break()
     instructs phpdbg to insert a breakpoint at the next opcode */
-static PHP_FUNCTION(phpdbg_break_next)
+PHP_FUNCTION(phpdbg_break_next)
 {
        zend_execute_data *ex;
 
@@ -352,7 +352,7 @@ static PHP_FUNCTION(phpdbg_break_next)
 } /* }}} */
 
 /* {{{ proto void phpdbg_break_file(string file, int line) */
-static PHP_FUNCTION(phpdbg_break_file)
+PHP_FUNCTION(phpdbg_break_file)
 {
        char *file;
        size_t flen;
@@ -366,7 +366,7 @@ static PHP_FUNCTION(phpdbg_break_file)
 } /* }}} */
 
 /* {{{ proto void phpdbg_break_method(string class, string method) */
-static PHP_FUNCTION(phpdbg_break_method)
+PHP_FUNCTION(phpdbg_break_method)
 {
        char *class, *method;
        size_t clen, mlen;
@@ -379,7 +379,7 @@ static PHP_FUNCTION(phpdbg_break_method)
 } /* }}} */
 
 /* {{{ proto void phpdbg_break_function(string function) */
-static PHP_FUNCTION(phpdbg_break_function)
+PHP_FUNCTION(phpdbg_break_function)
 {
        char    *function;
        size_t   function_len;
@@ -393,7 +393,7 @@ static PHP_FUNCTION(phpdbg_break_function)
 
 /* {{{ proto void phpdbg_clear(void)
    instructs phpdbg to clear breakpoints */
-static PHP_FUNCTION(phpdbg_clear)
+PHP_FUNCTION(phpdbg_clear)
 {
        if (zend_parse_parameters_none() == FAILURE) {
                RETURN_THROWS();
@@ -411,7 +411,7 @@ static PHP_FUNCTION(phpdbg_clear)
 } /* }}} */
 
 /* {{{ proto void phpdbg_color(int element, string color) */
-static PHP_FUNCTION(phpdbg_color)
+PHP_FUNCTION(phpdbg_color)
 {
        zend_long element;
        char *color;
@@ -434,7 +434,7 @@ static PHP_FUNCTION(phpdbg_color)
 } /* }}} */
 
 /* {{{ proto void phpdbg_prompt(string prompt) */
-static PHP_FUNCTION(phpdbg_prompt)
+PHP_FUNCTION(phpdbg_prompt)
 {
        char *prompt = NULL;
        size_t prompt_len = 0;
@@ -447,7 +447,7 @@ static PHP_FUNCTION(phpdbg_prompt)
 } /* }}} */
 
 /* {{{ proto void phpdbg_start_oplog() */
-static PHP_FUNCTION(phpdbg_start_oplog)
+PHP_FUNCTION(phpdbg_start_oplog)
 {
        phpdbg_oplog_list *prev;
 
@@ -524,7 +524,7 @@ static inline HashTable* phpdbg_add_empty_array(HashTable *ht, zend_string *name
 }
 
 /* {{{ proto void phpdbg_get_executable() */
-static PHP_FUNCTION(phpdbg_get_executable)
+PHP_FUNCTION(phpdbg_get_executable)
 {
        HashTable *options = NULL;
        zval *option_buffer;
@@ -622,7 +622,7 @@ static PHP_FUNCTION(phpdbg_get_executable)
 }
 
 /* {{{ proto void phpdbg_end_oplog() */
-static PHP_FUNCTION(phpdbg_end_oplog)
+PHP_FUNCTION(phpdbg_end_oplog)
 {
        phpdbg_oplog_entry *cur;
        phpdbg_oplog_list *prev;
@@ -724,29 +724,10 @@ static PHP_FUNCTION(phpdbg_end_oplog)
        }
 }
 
-static const zend_function_entry phpdbg_user_functions[] = {
-       PHP_FE(phpdbg_clear, arginfo_phpdbg_clear)
-       PHP_FE(phpdbg_break_next, arginfo_phpdbg_break_next)
-       PHP_FE(phpdbg_break_file, arginfo_phpdbg_break_file)
-       PHP_FE(phpdbg_break_method, arginfo_phpdbg_break_method)
-       PHP_FE(phpdbg_break_function, arginfo_phpdbg_break_function)
-       PHP_FE(phpdbg_exec, arginfo_phpdbg_exec)
-       PHP_FE(phpdbg_color, arginfo_phpdbg_color)
-       PHP_FE(phpdbg_prompt, arginfo_phpdbg_prompt)
-       PHP_FE(phpdbg_start_oplog, arginfo_phpdbg_start_oplog)
-       PHP_FE(phpdbg_end_oplog, arginfo_phpdbg_end_oplog)
-       PHP_FE(phpdbg_get_executable, arginfo_phpdbg_get_executable)
-#ifdef  PHP_FE_END
-       PHP_FE_END
-#else
-       {NULL,NULL,NULL}
-#endif
-};
-
 static zend_module_entry sapi_phpdbg_module_entry = {
        STANDARD_MODULE_HEADER,
        PHPDBG_NAME,
-       phpdbg_user_functions,
+       ext_functions,
        PHP_MINIT(phpdbg),
        PHP_MSHUTDOWN(phpdbg),
        PHP_RINIT(phpdbg),
index bcccc5f9d06998b365ac4d804ba39a8516c5994b..4d733ccaf6747a8af3baa79a69baf9b7c91f0bfb 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+/** @generate-function-entries */
+
 function phpdbg_break_next(): void {}
 
 function phpdbg_break_file(string $file, int $line): void {}
index 793d26f0648463a95a6feee4eabe9f913c739f87..c3e91fdab2c6737f43b4a281e7701e395ec374fd 100644 (file)
@@ -41,3 +41,32 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_get_executable, 0, 0, IS_ARRAY, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
 ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(phpdbg_break_next);
+ZEND_FUNCTION(phpdbg_break_file);
+ZEND_FUNCTION(phpdbg_break_method);
+ZEND_FUNCTION(phpdbg_break_function);
+ZEND_FUNCTION(phpdbg_color);
+ZEND_FUNCTION(phpdbg_prompt);
+ZEND_FUNCTION(phpdbg_exec);
+ZEND_FUNCTION(phpdbg_clear);
+ZEND_FUNCTION(phpdbg_start_oplog);
+ZEND_FUNCTION(phpdbg_end_oplog);
+ZEND_FUNCTION(phpdbg_get_executable);
+
+
+static const zend_function_entry ext_functions[] = {
+       ZEND_FE(phpdbg_break_next, arginfo_phpdbg_break_next)
+       ZEND_FE(phpdbg_break_file, arginfo_phpdbg_break_file)
+       ZEND_FE(phpdbg_break_method, arginfo_phpdbg_break_method)
+       ZEND_FE(phpdbg_break_function, arginfo_phpdbg_break_function)
+       ZEND_FE(phpdbg_color, arginfo_phpdbg_color)
+       ZEND_FE(phpdbg_prompt, arginfo_phpdbg_prompt)
+       ZEND_FE(phpdbg_exec, arginfo_phpdbg_exec)
+       ZEND_FE(phpdbg_clear, arginfo_phpdbg_clear)
+       ZEND_FE(phpdbg_start_oplog, arginfo_phpdbg_start_oplog)
+       ZEND_FE(phpdbg_end_oplog, arginfo_phpdbg_end_oplog)
+       ZEND_FE(phpdbg_get_executable, arginfo_phpdbg_get_executable)
+       ZEND_FE_END
+};