vimeo/psalm

`str_replace()` with more search then replace values

Open

#4,253 建立於 2020年9月28日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)PHP (668 fork)batch import
Help wantedenhancementtype providers

倉庫指標

Star
 (5,369 star)
PR 合併指標
 (平均合併 3天 12小時) (30 天內合併 5 個 PR)

描述

even if it is supported by php-src, I think it should be an error (or at least warning) when using str_replace with less replace args, then search args. its most likely a typo and the default behaviour of php-src assuming we want to replace with an empty string is not obvious.

I expect an error, telling me that the number of replace args is not equal with the number of search args in https://psalm.dev/r/7385fe7881

貢獻者指南