declare(strict_types=1);

function concat(string ...$words) {
    return join(' ', $words);
}

$strings = ['Hello', 'World', '!'];
$noneStrings = ['Hello', true, 'World'];

echo concat(...$strings);     // -> 'Hello world !'
echo concat(...$noneStrings); // -> FATAL ERROR Uncaught TypeError

Twitter