Skip to content

Commit 1254969

Browse files
authored
Declare remaining Zend constants in stubs (#9730)
1 parent 66f3b5f commit 1254969

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

Zend/zend_constants.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@ void zend_register_standard_constants(void)
111111
{
112112
register_zend_constants_symbols(0);
113113

114-
REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_PROVIDE_OBJECT", DEBUG_BACKTRACE_PROVIDE_OBJECT, CONST_PERSISTENT | CONST_CS);
115-
REGISTER_MAIN_LONG_CONSTANT("DEBUG_BACKTRACE_IGNORE_ARGS", DEBUG_BACKTRACE_IGNORE_ARGS, CONST_PERSISTENT | CONST_CS);
116-
REGISTER_MAIN_BOOL_CONSTANT("ZEND_THREAD_SAFE", ZTS_V, CONST_PERSISTENT | CONST_CS);
117-
REGISTER_MAIN_BOOL_CONSTANT("ZEND_DEBUG_BUILD", ZEND_DEBUG, CONST_PERSISTENT | CONST_CS);
118-
119-
/* Special constants true/false/null. */
120-
REGISTER_MAIN_BOOL_CONSTANT("TRUE", 1, CONST_PERSISTENT);
121-
REGISTER_MAIN_BOOL_CONSTANT("FALSE", 0, CONST_PERSISTENT);
122-
REGISTER_MAIN_NULL_CONSTANT("NULL", CONST_PERSISTENT);
123-
124114
true_const = zend_hash_str_find_ptr(EG(zend_constants), "TRUE", sizeof("TRUE")-1);
125115
false_const = zend_hash_str_find_ptr(EG(zend_constants), "FALSE", sizeof("FALSE")-1);
126116
null_const = zend_hash_str_find_ptr(EG(zend_constants), "NULL", sizeof("NULL")-1);

Zend/zend_constants.stub.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,33 @@
9797
* @cvalue E_ALL
9898
*/
9999
const E_ALL = UNKNOWN;
100+
101+
/**
102+
* @var int
103+
* @cvalue DEBUG_BACKTRACE_PROVIDE_OBJECT
104+
*/
105+
const DEBUG_BACKTRACE_PROVIDE_OBJECT = UNKNOWN;
106+
/**
107+
* @var int
108+
* @cvalue DEBUG_BACKTRACE_IGNORE_ARGS
109+
*/
110+
const DEBUG_BACKTRACE_IGNORE_ARGS = UNKNOWN;
111+
/**
112+
* @var bool
113+
* @cvalue ZTS_V
114+
*/
115+
const ZEND_THREAD_SAFE = UNKNOWN;
116+
/**
117+
* @var bool
118+
* @cvalue ZEND_DEBUG
119+
*/
120+
const ZEND_DEBUG_BUILD = UNKNOWN;
121+
122+
/* Special constants true/false/null. */
123+
124+
/** @var bool */
125+
const TRUE = true;
126+
/** @var bool */
127+
const FALSE = false;
128+
/** @var null */
129+
const NULL = null;

Zend/zend_constants_arginfo.h

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)