Created
March 8, 2021 21:39
-
-
Save petenelson/5120fecaa8f3a43ff246a71d2300f4af to your computer and use it in GitHub Desktop.
Namespaced PHP function.
This file contains 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 | |
/** | |
* Quickly provide a namespaced way to get functions. | |
* | |
* @param string $function Name of function in namespace. | |
* @return string | |
*/ | |
function n( $function ) { | |
return __NAMESPACE__ . "\\$function"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment