Description
we are in the process of covering the handling of uasort when using with strnatcasecmp and found a few things which we are not able to make sense of. I also looked thru the docs and did not find something which explained what we see.
the problem occur arround strict-types and Stringable vs. string territory.
especially interessting is that strnatcasecmp when invoked directly behaves differently in comparison while using strnatcasecmp as callback via uasort. results vary with strict-types 0/1.
see
so our questions mainly are
- is all this expected behaviour?
- can someone share some insights so we can properly reflect php-src runtime behaviour in PHPStan?
thank you
PHP Version
Operating System
No response
Description
we are in the process of covering the handling of
uasortwhen using withstrnatcasecmpand found a few things which we are not able to make sense of. I also looked thru the docs and did not find something which explained what we see.the problem occur arround strict-types and
Stringablevs.stringterritory.especially interessting is that
strnatcasecmpwhen invoked directly behaves differently in comparison while usingstrnatcasecmpas callback viauasort. results vary with strict-types 0/1.see
so our questions mainly are
thank you
PHP Version
Operating System
No response