addDescription( '测试拼音URL' ); } public function execute() { global $wgLatinizeUrlConfig; $parser = new Hanzi2Pinyin($wgLatinizeUrlConfig); $pinyin = $parser->parse('偏爱~But Destined To Be'); $url = $parser->pinyin2String($pinyin); var_dump($url); } } $maintClass = LatinizeUrlTest::class; require_once RUN_MAINTENANCE_IF_MAIN;