PS: trying to debug by inserting various echo: within function extCaller() $path and $xname are rendered correctly, but then $xname is not returned, so the preg_match in that function does not match, it seems.