1. Go to this page and download the library: Download jdkysq/translator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jdkysq / translator example snippets
/**
* 数据转换
* @param string $from 来源格式
* @return From
*/
public function from(string $from): From
/**
* 支持的格式检查
* @param string $format 探测目标格式
* @return bool
*/
public static function hasFormat($format): bool
/**
* 转化的目标格式
* @param string $to
* @return mixed
*/
public function to(string $to)
/**
* @return mixed
*/
public function encode()
/**
* @return array
*/
public function decode() :array