class UltimateStringConcatulator {
private $string = "";
public function __construct(string ...$parts) {
$this(...$parts);
}
public function __invoke(string ...$parts) : UltimateStringConcatulator {
foreach ($parts as $part) {
$this->string .= $part;
}
return $this;
}
public function __toString() : string {
return $this->string;
}
}
function concat(string ...$ugh) {
return new UltimateStringConcatulator(...$ugh);