<?php
$config = [
'separator' => '_',
];
// 'use ()' must be used in a function expression
$fullname = function ($first, $last) use ($config) {
return "{$first}{$config['separator']}{$last}";
};
echo $fullname('Jake', 'Jackson');
To embed this project on your website, copy the following code and paste it into your website's HTML: