ctrLogicDotNet wrote:Thought that specifying the type would prevent me of testing it inside the function
Well, it won't. Not if you're testing for boolean. The only way reasonable way you can do that is with is_bool().
And this way specifying to the user the misuses of a function by providing wrong type of arguments...
That's not a good reason, believe me. Do not write your code expressly to prevent you or other programmers from doing a bad job, not in PHP at least; such things should be implicit from your design. Others may oppose this viewpoint, but they will be wrong. Instead, make the purpose of your parameter obvious with a good name, if you can't do that, there's possibly something wrong with the design that deemed this function/parameter to be necessary.