<?php function config($key): string { $arr = ["protocol"=> "https", "port"=> "80", "website"=>"wwww.example.com"]; return array_key_exists($key, $arr) ? $arr[$key] : null; } function myfunc(callable $configAccessor){ echo $configAccessor("port"); } myfunc('config');
You have javascript disabled. You will not be able to edit any code.