Skip to content

Commit d11bc50

Browse files
authored
Merge pull request #5 from jNullj/Leet
Adding Leet to the site close #2
2 parents 013a3fd + 3dd81aa commit d11bc50

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

decorator.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public function cycle($text){
3030
}
3131
return str_replace($this->origin, $map, $text);
3232
}
33+
34+
public function leet($text){
35+
$from = ['a','e','g','i','o','s','t','A','E','G','I','O','S','T'];
36+
$to = ['4','3','6','1','0','5','7','4','3','6','1','0','5','7'];
37+
return str_replace($from, $to, $text);
38+
}
3339
}
3440

3541
?>

index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
Enter your text here → <input type="text" name="input" value="<?=$_POST["input"]; ?>" />
2222
<br />
2323
Circled text: <input type="text" name="cool1" value="<?=$dec->cycle($_POST["input"]); ?>" />
24+
<br />
25+
Leet text: <input type="text" name="cool1" value="<?=$dec->leet($_POST["input"]); ?>" />
2426
<?php
2527
}
2628
else
@@ -29,6 +31,8 @@
2931
Enter your text here → <input type="text" name="input" />
3032
<br />
3133
Circled text: <input type="text" name="cool1" />
34+
<br />
35+
Leet text: <input type="text" name="cool1" />
3236
<?php
3337
}
3438
?>

0 commit comments

Comments
 (0)