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 | |
session_start(); | |
/** | |
* Flash a message in the session, or get a message from the session | |
**/ | |
function flash(string $key, string $message = null) | |
{ | |
if (empty($message)) { | |
$message = $_SESSION[$key] ?? null; |
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('join_paths')) { | |
/** | |
* Join two or more paths together | |
*/ | |
function join_paths(string ...$paths): string | |
{ | |
$first = array_shift($paths); |