At `public function parseHost($string)` you assume that the TLD is the piece after the last period. This assumption break in the case of `sub.domain.com.af`. One way to solve it is to check for valid values (co, com).
At
public function parseHost($string)you assume that the TLD is the piece after the last period.This assumption break in the case of
sub.domain.com.af. One way to solve it is to check for valid values (co, com).