public static function implode(string $separator, array $items, ?callable $itemFunction = null): string
    {
        if (is_callable($itemFunction)) {
            foreach ($items as $index => $item) {
                $items[$index] = $itemFunction($item);
            }
        }
        return implode($separator, $items);
    }
public static function implode(string $separator, array $items, ?callable $itemFunction = null): string
    {
        if (is_callable($itemFunction)) {
            foreach ($items as $index => $item) {
                $items[$index] = $itemFunction($item);
            }
        }
        return implode($separator, $items);
    }
public static function implode ( string $ separator , array $ items , ? callable $ itemFunction = null ) : string { if ( is_callable ( $ itemFunction ) ) { foreach ( $ items as $ index => $ item ) { $ items [ $ index ] = $ itemFunction ( $ item ) ; } } return implode ( $ separator , $ items ) ; }
Implode items into string.

@param string $separator
@param string[] $items
@param callable $itemFunction
@return string
Implode items into string .