Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Created May 7, 2018 08:00
Show Gist options
  • Select an option

  • Save BastinRobin/2c698823edf18e7ae3529e9b34ebb9f2 to your computer and use it in GitHub Desktop.

Select an option

Save BastinRobin/2c698823edf18e7ae3529e9b34ebb9f2 to your computer and use it in GitHub Desktop.
Check Organization Email
<?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