Replace deprecated character access syntax

This `$string{0}` character access syntax was around for a while in PHP but always scared me.
> The {0} syntax is deprecated in PHP 6.

Citation needed :)

> I prefer substr over [0] because it's more "type safe" in a way.

You must really not like Python then