1--TEST--
2DOMXPath::evaluate() with PHP function passing node-set returning a string
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = new DOMDocument();
9$dom->loadXML(<<<XML
10<?xml version="1.0"?>
11<container>
12    <p>hi</p>
13</container>
14XML);
15
16$xpath = new DOMXPath($dom);
17
18$xpath->registerNamespace("php", "http://php.net/xpath");
19$xpath->registerPhpFunctions(['strrev']);
20var_dump($xpath->evaluate('php:functionString("strrev", //p)'));
21var_dump($xpath->evaluate('php:functionString("strrev", //namespace::*)'));
22
23?>
24--EXPECT--
25string(2) "ih"
26string(36) "ecapseman/8991/LMX/gro.3w.www//:ptth"
27