Help wantedbugeasy problemsgood first issuetype providers
Repository metrics
- Stars
- (5,369 stars)
- PR merge metrics
- (Avg merge 3d 12h) (5 merged PRs in 30d)
Description
The return type of str_replace is deduced to be string when I pass it a $subject (the third parameter) of type string | array<string>. A $subject of type string leads to the string return type, while array<float | int | string> leads to array<string>, which is correct. It only incorrectly assumes string when the $subject is of a union type.