I think you misunderstood the test: if no preg_match, throw, else: populate options['need_ssl'] as needed.