Skip to content

Commit 9fd19a9

Browse files
committed
Add comment about strict type handling for op overloading
1 parent efaa6a8 commit 9fd19a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/gmp/gmp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ static bool gmp_zend_parse_arg_into_mpz_ex(
129129
return true;
130130
}
131131

132+
/* This function is also used by the do_operation object hook,
133+
* but operator overloading with objects should behave as if a
134+
* method was called, thus strict types should apply. */
132135
if (!ZEND_ARG_USES_STRICT_TYPES()) {
133136
zend_long lval = 0;
134137
if (is_operator && Z_TYPE_P(arg) == IS_NULL) {

0 commit comments

Comments
 (0)