|
In this case it won't make a difference. === not only compares the values but also the type.
So 5 == '5' will return true but 5 === '5' won't
$_POST['username'] == '' will return true if the user did not enter his name, or if there is no such field as username
$_POST['username'] === '' will return true only if the user did not enter his name meaning the field must exist
In most cases == will work just like === but keep an eye out for the special cases when the type really matters.
In your case using === does not make any difference. I've read that === has better performance but it is negligible
Last edited by NullPointer : 08-28-2008 at 10:16 PM.
|