$options['address'] ?? $options['a'] ?? '', 'port' => $options['port'] ?? $options['p'] ?? '', 'id' => $options['id'] ?? $options['i'] ?? '', 'hash' => $options['hash'] ?? $options['h'] ?? '', 'help' => isset($options['help']), ]; if ($options['help']) { $help = 'Fast, simple, async php telegram parser: MadelineProto + Swoole Server usage: php server.php [--help] [-a|--address=127.0.0.1] [-p|--port=9503] Options: --help Show this message -a --address Server ip (optional) (example: 127.0.0.1) -p --port Server port (optional) (example: 9503) Also all options can be set in .env file (see .env.example) Example: php server.php '; echo $help; exit; } $client = new \TelegramSwooleClient\Client($root); new TelegramSwooleClient\Server($client, $options);