Skip to content

Instantly share code, notes, and snippets.

@mcsee

mcsee/repeated.php

Last active Dec 9, 2020
Embed
What would you like to do?
<?
final 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