Was asked this question recently, and haven’t done any low level string manipulation w PHP in a little while. Couldn’t remember the signature of substr(), but that wasn’t my method anyway. Mine was more like iterating over an index, working from the back forward and concat-ing that on to a new string. Also, this is like 5 minutes worth of code, so cut me some slack.
So the method that I was working on (#2 str_concat) is the fastest besides the built in strrev(), but most interesting is when you run these same tests on PHP 7.0.4 —