Extracting parts of a string
Java has the substring method int) which extracts a string beginning at the first argument, and ending just before the second argument. Each argument is an index into the string, taken as an offset from the first character.
PHP has the substr function, taking three arguments. The first is the string, and the next two are start and length. Like Java, the start argument is an offset from the first character.