new Memory, 'mysql' => (new Mysql)->setUri('tcp://mariadb')->setUsername('MadelineProto')->setPassword('test'), 'postgres' => (new Postgres)->setUri('tcp://postgres')->setUsername('MadelineProto')->setPassword('test'), 'redis' => (new Redis)->setUri('redis://redis'), ]; $settings = $map[$argv[1]]; if (!$settings instanceof Memory) { $settings->setSerializer($argv[2] === 'igbinary' ? SerializerType::IGBINARY : SerializerType::SERIALIZE); } $MadelineProto->updateSettings($settings); var_dump($MadelineProto->getFullInfo('danogentili'));