rfc:user_defined_operator_overloads
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:user_defined_operator_overloads [2021/12/10 23:03] – More detail to extensions jordanrl | rfc:user_defined_operator_overloads [2021/12/11 12:26] – copy edit jordanrl | ||
---|---|---|---|
Line 107: | Line 107: | ||
<code php> | <code php> | ||
// These all should result in an error | // These all should result in an error | ||
- | $obj->' | + | $obj->{' |
call_user_func([$obj, | call_user_func([$obj, | ||
call_user_func(' | call_user_func(' | ||
Line 418: | Line 418: | ||
These methods need to be updated to ignore the operator methods. Since these are stored internally like any other function on the class entry, they need to be filtered from the results. | These methods need to be updated to ignore the operator methods. Since these are stored internally like any other function on the class entry, they need to be filtered from the results. | ||
- | The reason for removing the operators from this result is because the operator methods are not callable with string literals on the object. Since they cannot be called like a method is, the should be returned with the other methods on a class. | + | The reason for removing the operators from this result is because the operator methods are not callable with string literals on the object. Since they cannot be called like a method is, they should |
== Adding getOperators(), | == Adding getOperators(), |
rfc/user_defined_operator_overloads.txt · Last modified: 2022/01/17 01:16 by jordanrl