I just tried my example and it wasn't crashing me now for some strange reason.
But after messing around, I did echo(getWords("1 2 3 4 5 6 7 8 9", 3, 2)); and it crashed me.
I also started Blockland up again to try it to verify that crashes me, and it does.
What could be causing it to crash?