romanitalian / leetify
此包最新版本(dev-master)没有提供许可证信息。
让您的消息变得有趣!Leetify 是一个有趣的工具,可以将任何消息转换为这种形式:“看起来像这样” -> “100kz 1ik3 +hiz”
dev-master
2017-09-21 06:50 UTC
This package is not auto-updated.
Last update: 2024-09-14 18:42:14 UTC
README
Leetify 是一个有趣的工具,可以将任何消息转换为这种形式:“看起来像这样” -> “100kz 1ik3 +hiz”
您可以使用 composer 脚本来调用此包 - Leetify。只需将其添加到您的 composer.json 中
... "require": { "romanitalian/leetify": "dev-master" } ...
或者在初始化 composer 后执行以下操作
composer require romanitalian/leetify
<?php use Leet\Leetify; use Leet\LeetifySimple; require_once 'protected/autoload.php'; $out = array(); $str = '133+'; $out['Leetify'][$str] = Leetify::decode($str); $str = 'leet'; $out['Leetify'][$str] = Leetify::encode($str); $str = 'looks like this'; $out['Leetify'][$str] = Leetify::encode($str); $str = 'terry'; $out['Leetify'][$str] = Leetify::encode($str); Leetify::getInstance()->destroy(); $str = '133+'; $out['LeetifySimple'][$str] = LeetifySimple::decode($str, 'latin'); $str = 'leet'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); $str = 'looks like this'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); $str = 'terry'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); $str = '3ез4'; $out['LeetifySimple'][$str] = LeetifySimple::decode($str, 'cyrillic'); $str = 'жезл'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); $str = '«Мягкий leet — это очень весело»'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); $str = 'm99k11 l33t — 3t0 0ch3n v35310.'; $out['LeetifySimple'][$str] = LeetifySimple::decode($str, 'cyrillic'); $str = "Мя4кZй 133+ — это о|-|ен' весе4о"; $out['LeetifySimple'][$str] = LeetifySimple::decode($str); $str = 'Shut the fuck up, noob. I owned your ass.'; $out['LeetifySimple'][$str] = LeetifySimple::encode($str); var_dump($out); /* array (size=2) 'Leetify' => array (size=4) '133+' => string 'teet' (length=4) 'leet' => string 'ВЈəe-|-' (length=10) 'looks like this' => string '1Øo|(z ¬3y3|c& +I+I¡es' (length=25) 'terry' => string '~|~[-|2|`λ' (length=11) 'LeetifySimple' => array (size=10) '133+' => string 'leet' (length=4) 'leet' => string '133+' (length=4) 'looks like this' => string '100kz 1ik3 +hiz' (length=15) 'terry' => string '+3rrj' (length=5) '3ез4' => string 'eезA' (length=6) 'жезл' => string 'жезл' (length=8) '«Мягкий leet — это очень весело»' => string '«Мягкий 133+ — это очень весело»' (length=56) 'm99k11 l33t — 3t0 0ch3n v35310.' => string 'm99kll leet — etO Ochen ve5elO.' (length=33) 'Мя4кZй 133+ — это о|-|ен' весе4о' => string 'МяAкSй leet — это о|-|ен' весеAо' (length=49) 'Shut the fuck up, noob. I owned your ass.' => string 'Zhu+ +h3 fuck up, n00b. I 0wn3d j0ur 4zz.' (length=41) */