functionID is what's called "standard level" in the link I posted. So it should be 4 (you can also see that in the C version btw.).
I agree that the example isn't very well tested - the author probably pulled it out of some existing code and wasn't very careful.