substring is when you want to specify a starting and ending index. substr is when you want to specify a starting offset and a length. They do different things and have different use cases.
To better answer the exact question of
Why substring does not handle negative indices?
substring specifies a starting and ending index of characters in a string.
substr deals with a starting offset and a length. It makes sense to me that
substring does not allow a negative index, because there really isn't a such thing as a negative index (the characters in a string are indexed from 0 to n, a "negative index" would be out of bounds). Since
substr is dealing with an offset vs an index, I feel the term offset is loose enough to allow for a negative offset, which of course means counting backwards from the end of the string rather than forward from the beginning. This might just be semantics, but its how I make sense of it.
I would argue that is in fact not deprecated.
Which states that the HTML string methods are deprecated (which they should be!). These are methods that wrap a string in an HTML tag, ie,
"abc".sub() would return
<sub>abc</sub>. The blog post lists out all of the HTML string methods, and imho, erroneously includes
subtr as an HTML string method (it isn't).
So this looks like a misunderstanding to me.
(Excerpt below, emphasis added by me)