For example, preg_split should have its return type as list<string> and not merely list.
A more complex case is preg_replace, where the return type depends on the argument type. PHPStan has a solution for that.
I realize that the code is generated from an XML version of the documentation, so am not sure how these issues can be solved without special-casing, which I'd prefer to avoid.
For example,
preg_splitshould have its return type aslist<string>and not merelylist.A more complex case is
preg_replace, where the return type depends on the argument type. PHPStan has a solution for that.I realize that the code is generated from an XML version of the documentation, so am not sure how these issues can be solved without special-casing, which I'd prefer to avoid.