Usage example:
{{ Arr::random([
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard', 'Dashboard',
'Dashborad', 'Dashbord', 'Dashbaord', 'Dasbhoard', 'Dashboar',
]) }}
This would show a random typo sometimes, but 9 out of 10 visits would see a correct `Dashboard` text on the anchor element.
I believe this use of torture is banned by the Geneva Convention.
but why
{{ substr($text = “Dashboard”, 0, -(int)round(rand(1,50) / 100) ?: strlen($text)) }}
Way harder to find.
Edit: Oh. I see now. There are multiple misspellings.
I still think a randomiser would be more diabolical, because you can easily find the text string in the project with an array holding the actual text string shown on the page.
This is stupid to boot, and poorly written.
I did this recently to wind up one of the less tech inbolved directors of my main client. There’s been a typo on the UI for 4 years which has really bugged him, but he never reported it as an issue. It was only mentioned to me by the other director a couple of weeks back.
So I fixed it. Sometimes. Just for his user account, it will display a completely different typo. But only 1 in 10 times.
I’ve not had a report back yet.
Gonna sneak it into my package with 700 downloads….
calm down Satan..
Straight from TBOFH.
Why not make it better
Arr::random(array_map(fn () => ‘da’. Str::shuffle(‘shboard’)), range(0, rand()))
And you’re fired on the next code review…
Haha thanks, I’m gonna have fun with this
I love this