Question: Difference between type() and is()

Hello,

I'm currently wondering about the "real" difference.

is() or type() can be used both for true/false checks. However when should what be used preferably?

For example I do not see what is better over the other when doing simple checks such as

is(2,'integer')

type(2,'integer')

 

Thanks for clarifying.

Please Wait...