Skip to content

Instantly share code, notes, and snippets.

@petenelson
Created March 8, 2021 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petenelson/5120fecaa8f3a43ff246a71d2300f4af to your computer and use it in GitHub Desktop.
Save petenelson/5120fecaa8f3a43ff246a71d2300f4af to your computer and use it in GitHub Desktop.
Namespaced PHP function.
<?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