4 if (!function_exists("uri_template")) {
5 function uri_template(string $str, array $arr = []) : string {
6 $tpl = new \Rize\UriTemplate
;
7 return $tpl->expand($str, $arr);
14 * Generate a human-readable representation of a variable
16 * @param bool $export whether to var_export the $arg
19 function typeof($arg, bool $export = false) : string {
20 $type = is_object($arg)
21 ?
"instance of ".get_class($arg)
24 $type .= ": ".var_export($arg, true);