Q:

Is there any difference between {strlen($var) == 0} and {empty($var)}

considering that the variable only can be String fetched from an HTML Form (input-text, textarea).

A:

Yes, there is a difference between strlen($str)==0 and empty($str). empty returns true if the value is "0". See the PHP type comparison tables.

