--TEST--
php:function() edge cases
--EXTENSIONS--
xsl
--FILE--
loadXML('
');
$inputdom = new DomDocument();
$inputdom->loadXML('
');
$proc = new XsltProcessor();
$proc->registerPhpFunctions();
$xsl = $proc->importStylesheet($xsl);
try {
$proc->transformToDoc($inputdom);
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
}
try {
test("");
} catch (Throwable $e) {
echo $e->getMessage(), "\n";
}
test("3");
?>
--EXPECTF--
Function name must be passed as the first argument
Warning: XSLTProcessor::transformToDoc(): Handler name must be a string in %s on line %d