5 ms·
I guess that's a good way to make code very... unreadable and hard to set breakpoints on? What's wrong with: function slug(string $s) { $s = strtolow
by jakearmitage 5y ago
I guess that's a good way to make code very... unreadable and hard to set breakpoints on? What's wrong with:
function slug(string $s) {
$s = strtolower($s);
$s = str_replace(" ", "-", $s);
return $s;
}
And, if you need classes, aren't you better served with a Decorator implementation? I just don't see the point here.