vimeo/psalm

implode(<non-false-string>, array) should produce non-falsy-string

Open

#7,055 opened on Dec 4, 2021

View on GitHub
 (2 comments) (0 reactions) (0 assignees)PHP (668 forks)batch import
Help wantedeasy problemsenhancementtype providers

Repository metrics

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

Description

When the first argument is a non-falsy-string and the second argument has at least two elements, then the result is guaranteed to be at least non-falsy-string.

<?php

if(implode(' ', ['',''])) echo 1;

https://psalm.dev/r/19514cf5db

Contributor guide