input('link_ending'); $ending_conforms = LinkHelper::validateEnding($link_ending); if (!$ending_conforms) { return "invalid"; } else if (LinkHelper::linkExists($link_ending)) { // if ending already exists return "unavailable"; } else { return "available"; } } }