<?php
class Bot {
public string $token;
public function __construct(string $token) {
$this->createUrl($token);
}
protected function createUrl(string $token) : string {
$url = 'https://api.telegram.org/bot' . $token;
return $url;
}
}
$bot = new Bot('string');
echo $bot;