When using spl_autoload_register, an imported function via use function Namespace\Subamespace\aFunc php cannot find the function. The registered autolaod function is not invoked. If I manually include Path/To/File.php then the use statement works and the included function will work. Solutions?
autoload.php
function loader($class){
printf("in loader");
/*code to load file*/
}
spl_autoload_register('loader');
index.php
include_once('autoload.php');
use function Namespace\Subnamespace\aFunc;
$output = aFunc();
Namespace/Subnamespace.php
<?php namespace Namespace\Subnamespace;
function aFunc() {
//do stuff
}