1--TEST--
2php:function Support - non-DOMNode
3--EXTENSIONS--
4xsl
5--FILE--
6<?php
7Class foo {
8    function __construct() {}
9    function __toString() { return "not a DomNode object";}
10}
11
12function nonDomNode() {
13    return new foo();
14}
15
16$dom = new domDocument();
17$dom->load(__DIR__."/xslt_non_dom_node.xsl");
18$proc = new xsltprocessor;
19$xsl = $proc->importStylesheet($dom);
20
21$xml = new DomDocument();
22$xml->load(__DIR__."/xslt011.xml");
23$proc->registerPHPFunctions();
24try {
25    $proc->transformToXml($xml);
26} catch (TypeError $e) {
27    echo $e->getMessage();
28}
29?>
30--EXPECT--
31Only objects that are instances of DOMNode can be converted to an XPath expression
32