split() default flag is PREG_SPLIT_NO_EMPTY.
Change regex delimiter. #mania
Force the compareTo() method to compare strings.
Add the l index in the returned array.

l is equal to j - i, where i the position of the beginning of the
resulting word, j the position of the end and l is the length.
Update API documentation & enforce match() method.
Force $x and $y to be strings.
Update example.