vimeo/psalm

implode(<string>, non-empty-list<string>) doesn't always result in non-empty-string

Open

#6,866 opened on Nov 8, 2021

View on GitHub
 (5 comments) (0 reactions) (0 assignees)PHP (668 forks)batch import
Help wantedbugeasy problemsgood first issueinternal stubs/callmap

Repository metrics

Stars
 (5,369 stars)
PR merge metrics
 (Avg merge 3d 12h) (5 merged PRs in 30d)

Description

https://psalm.dev/r/9b7a45c338

The weird edge case of implode('asdf', ['']); can result in an empty string. Similarly if the first argument is an empty string then an array of any amount of empty strings will also produce an empty string

Contributor guide