1--TEST--
2Check xsltprocessor::registerPHPFunctions and a undefined php function
3--DESCRIPTION--
4The XSL script tries to call a php function that is not defined
5--EXTENSIONS--
6xsl
7--FILE--
8<?php
9include __DIR__ .'/prepare.inc';
10$phpfuncxsl = new domDocument();
11$phpfuncxsl->load(__DIR__."/phpfunc-undef.xsl");
12if(!$phpfuncxsl) {
13  echo "Error while parsing the xsl document\n";
14  exit;
15}
16$proc->importStylesheet($phpfuncxsl);
17var_dump($proc->registerPHPFunctions());
18try {
19  var_dump($proc->transformToXml($dom));
20} catch (Throwable $e) {
21  echo $e->getMessage(), "\n";
22}
23?>
24--EXPECT--
25NULL
26Invalid callback undefinedfunc, function "undefinedfunc" not found or invalid function name
27--CREDITS--
28Christian Weiske, cweiske@php.net
29PHP Testfest Berlin 2009-05-09
30