diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 52eed52fbacb4..0540676e0f5f2 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -170,11 +170,7 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */ zend_execute_ex = phpdbg_execute_ex; - REGISTER_STRINGL_CONSTANT("PHPDBG_VERSION", PHPDBG_VERSION, sizeof(PHPDBG_VERSION)-1, CONST_CS|CONST_PERSISTENT); - - REGISTER_LONG_CONSTANT("PHPDBG_COLOR_PROMPT", PHPDBG_COLOR_PROMPT, CONST_CS|CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("PHPDBG_COLOR_NOTICE", PHPDBG_COLOR_NOTICE, CONST_CS|CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("PHPDBG_COLOR_ERROR", PHPDBG_COLOR_ERROR, CONST_CS|CONST_PERSISTENT); + register_phpdbg_symbols(module_number); return SUCCESS; } /* }}} */ diff --git a/sapi/phpdbg/phpdbg.stub.php b/sapi/phpdbg/phpdbg.stub.php index 40a51d892a166..ad0e42c85c572 100644 --- a/sapi/phpdbg/phpdbg.stub.php +++ b/sapi/phpdbg/phpdbg.stub.php @@ -2,6 +2,28 @@ /** @generate-class-entries */ +/** + * @var string + * @cvalue PHPDBG_VERSION + */ +const PHPDBG_VERSION = UNKNOWN; + +/** + * @var int + * @cvalue PHPDBG_COLOR_PROMPT + */ +const PHPDBG_COLOR_PROMPT = UNKNOWN; +/** + * @var int + * @cvalue PHPDBG_COLOR_NOTICE + */ +const PHPDBG_COLOR_NOTICE = UNKNOWN; +/** + * @var int + * @cvalue PHPDBG_COLOR_ERROR + */ +const PHPDBG_COLOR_ERROR = UNKNOWN; + function phpdbg_break_next(): void {} function phpdbg_break_file(string $file, int $line): void {} diff --git a/sapi/phpdbg/phpdbg_arginfo.h b/sapi/phpdbg/phpdbg_arginfo.h index 043f667459576..8f7ff50f4c3e7 100644 --- a/sapi/phpdbg/phpdbg_arginfo.h +++ b/sapi/phpdbg/phpdbg_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: dc2e5420ea396c6235429c9606875ad2332811cb */ + * Stub hash: 08e29f02953f23bfce6ce04f435227b4e5e61545 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phpdbg_break_next, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -71,3 +71,11 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(phpdbg_get_executable, arginfo_phpdbg_get_executable) ZEND_FE_END }; + +static void register_phpdbg_symbols(int module_number) +{ + REGISTER_STRING_CONSTANT("PHPDBG_VERSION", PHPDBG_VERSION, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHPDBG_COLOR_PROMPT", PHPDBG_COLOR_PROMPT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHPDBG_COLOR_NOTICE", PHPDBG_COLOR_NOTICE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHPDBG_COLOR_ERROR", PHPDBG_COLOR_ERROR, CONST_CS | CONST_PERSISTENT); +}