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