Quote:
Originally Posted by ownedbycats
Thanks
New quesiton: When checking that a text column value is undefined, is there difference between !$foo and $foo == '', or any reason to prefer one or the other??
|
They (should) give the same answer.
!$foo is a bit faster because it avoids evaluating the value to be compared.
That said,
$#foo == '' can be easier to understand, should self documentation be a goal.