Last active
February 29, 2024 13:26
-
-
Save mcsee/b6df5d98efbecc9be783006d364e63f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class WordProcessor { | |
function replaceText(string $patternToFind, string $textToReplace) { | |
$this->text = '<<<' . | |
str_replace($patternToFind, $textToReplace, $this->text) | |
. '>>>'; | |
} | |
} | |
final class Obfuscator { | |
function obfuscate(string $patternToFind, string $textToReplace) { | |
$this->text = | |
strlower(str_ireplace( | |
$patternToFind, $textToReplace, $this->text)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment