Created
September 11, 2019 20:54
-
-
Save sobanvuex/86b7771f82b4b9050585f9e6a2565dea to your computer and use it in GitHub Desktop.
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 | |
if (!function_exists('path')) { | |
/** | |
* Get the path to the app folder. | |
* | |
* @param null|string $path | |
* @param string ...$argv | |
* | |
* @return string | |
*/ | |
function path(string $path = null, string ...$argv): string | |
{ | |
return __DIR__ . ( | |
$path ? ( | |
DIRECTORY_SEPARATOR . $path . ( | |
$argv ? ( | |
DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $argv) | |
) : '' | |
) | |
) : '' | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment