You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check if the calling function is builtin, not the callback
The non-error on `uasort($options, 'strnatcasecmp')` in strict mode is
because uasort (the caller) is builtin, not because strnatcasecmp (the
callback) is builtin. Per PHP internals, when a builtin function calls
a callback, it always uses strict_types=0.
- Remove isBuiltin() from CallableParametersAcceptor interface and all
implementations (was checking the wrong function)
- Forward $strictTypes through CallableType/ClosureType accepts() to
CallableTypeHelper
- In FunctionCallParametersCheck, set strictTypes=false for callable
parameters of builtin functions
- Update tests: customUsort (user-defined) in strict mode now correctly
reports an error, while uasort/usort (builtin) do not
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments