Perhaps using strpos() wasn't quite such a good example, because -1 could never be a valid answer, and is therefore potentially OK as an error-flag.
This is in the same spirit as, for example, C's write() .
BUT, what do you do with an integer-function that normally returns an integer (negative, positive, or zero) when it needs to return an error?
There are several ways to do it; of which I think that C's strtol() is the worst possible. Some might suggest returning an object, but that's logically equivalent. PHP has adopted the general convention that any function that fails will return false; I think this is actually quite sensible once one knows to expect it.
As for the casting rules of "0.0" vs 0.0, it's rather a perverse example, which shouldn't happen in real-life.