I need to get the last character of a string. Say I have \"testers\" as input string and I want the result to be \"s\". how can I do that in PHP?
I'd advise to go for Gordon's solution as it is more performant than substr():
outputs something like
---------------------------------- 10000000 repetitions... ---------------------------------- substr() took 2.0285921096802seconds array access took 1.7474739551544seconds