Skip to content

Instantly share code, notes, and snippets.

@xralphack
Created August 7, 2017 06:41
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 xralphack/79aaf8d6813be88f96e1785a04128f94 to your computer and use it in GitHub Desktop.
Save xralphack/79aaf8d6813be88f96e1785a04128f94 to your computer and use it in GitHub Desktop.
function getScriptNameFromPath($path)
{
$pathElements = explode('/', $path);
$scriptName = end($pathElements);
reset($pathElements);
return $scriptName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment