Created
May 7, 2018 08:00
-
-
Save BastinRobin/2c698823edf18e7ae3529e9b34ebb9f2 to your computer and use it in GitHub Desktop.
Check Organization Email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Write a php function which should behave like the following | |
| /** | |
| * For eg: | |
| * is_email_official('info@hashresearch.com', 'http://hashresearch.com'); | |
| * >> True | |
| * | |
| * is_email_official('info@gmail.com', 'http://hashresearch.com'); | |
| * >> False | |
| * | |
| * is_email_official('info@theaims.com', 'http://theaims.com'); | |
| * >> True | |
| * | |
| * is_email_official('info@hashresearch.com', 'hashresearch.com'); | |
| * >> True | |
| * | |
| */ | |
| /** | |
| * Check if the email id belongs to the given url | |
| * @param [string] $email [eg: info@hashresearch.com] | |
| * @param [string] $url [eg: http://hashresearch.com] | |
| * @return [type] [boolen True or False] | |
| */ | |
| function is_email_official($email, $url) { | |
| // write your logics here and return boolean | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment