Updated to match changes to PHP version. Trying to make visitor generic but strict.