Because $li is defined, ($li) and (!empty($li)) are the same condition.