Skip to content

Commit 7c44baa

Browse files
committed
[skip ci] Add comments as to why no ZPP union type format is used
1 parent 0c0b41d commit 7c44baa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Zend/zend_builtin_functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ ZEND_FUNCTION(method_exists)
868868
zend_class_entry *ce;
869869
zend_function *func;
870870

871+
/* We do not use Z_PARAM_OBJ_OR_STR here to be able to exclude int, float, and bool which are bogus class names */
871872
ZEND_PARSE_PARAMETERS_START(2, 2)
872873
Z_PARAM_ZVAL(klass)
873874
Z_PARAM_STR(method_name)
@@ -930,6 +931,7 @@ ZEND_FUNCTION(property_exists)
930931
zend_class_entry *ce;
931932
zend_property_info *property_info;
932933

934+
/* We do not use Z_PARAM_OBJ_OR_STR here to be able to exclude int, float, and bool which are bogus class names */
933935
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zS", &object, &property) == FAILURE) {
934936
RETURN_THROWS();
935937
}

ext/spl/php_spl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ PHP_FUNCTION(class_parents)
7474
zend_class_entry *parent_class, *ce;
7575
bool autoload = 1;
7676

77+
/* We do not use Z_PARAM_OBJ_OR_STR here to be able to exclude int, float, and bool which are bogus class names */
7778
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) {
7879
RETURN_THROWS();
7980
}
@@ -107,6 +108,7 @@ PHP_FUNCTION(class_implements)
107108
bool autoload = 1;
108109
zend_class_entry *ce;
109110

111+
/* We do not use Z_PARAM_OBJ_OR_STR here to be able to exclude int, float, and bool which are bogus class names */
110112
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) {
111113
RETURN_THROWS();
112114
}
@@ -135,6 +137,7 @@ PHP_FUNCTION(class_uses)
135137
bool autoload = 1;
136138
zend_class_entry *ce;
137139

140+
/* We do not use Z_PARAM_OBJ_OR_STR here to be able to exclude int, float, and bool which are bogus class names */
138141
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &obj, &autoload) == FAILURE) {
139142
RETURN_THROWS();
140143
}

0 commit comments

Comments
 (0)