A PHP extension to integrate TdLib via JSON interface
- PHP 7.0+
phpize
./configure
make
make install
Add the following line to your php.ini
extension=tdlib.so
To try out the extension, you can run the following command
php -a -d extension=modules/tdlib.so
<?php
class TdLib
{
/**
* Synchronously executes TDLib request.
* Only a few requests can be executed synchronously.
*
* @param array|\JsonSerializable $request
*
* @return array
*/
public static function execute($request): array
{
}
/**
* Receives incoming updates and request responses from the TDLib client.
*
* @param float $timeout The maximum number of seconds allowed for this function to wait for new data.
*
* @return array
*/
public function receive(float $timeout): array
{
}
/**
* Sends request to the TDLib client.
*
* @param array|\JsonSerializable $request
*/
public function send($request): void
{
}
}
Please see CONTRIBUTING and CONDUCT for details.
Please see License File for more information.