Reversing a string in most languages is a pretty trivial task. In PHP we have a
dedicated strrev function to do so:
But what if this function didn’t exist? How would you go about reversing the
string? For me, I’d loop through the string from back to forward build out a
new string. You can event accomplish this a couple of different ways!