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--SKIPIF-- 6<?php 7 if (!extension_loaded('xsl')) { 8 die("skip\n"); 9 } 10?> 11--FILE-- 12<?php 13include dirname(__FILE__) .'/prepare.inc'; 14$phpfuncxsl = new domDocument(); 15$phpfuncxsl->load(dirname(__FILE__)."/phpfunc-undef.xsl"); 16if(!$phpfuncxsl) { 17 echo "Error while parsing the xsl document\n"; 18 exit; 19} 20$proc->importStylesheet($phpfuncxsl); 21var_dump($proc->registerPHPFunctions()); 22var_dump($proc->transformToXml($dom)); 23--EXPECTF-- 24NULL 25 26Warning: XSLTProcessor::transformToXml(): Unable to call handler undefinedfunc() in %s on line %d 27NULL 28--CREDITS-- 29Christian Weiske, cweiske@php.net 30PHP Testfest Berlin 2009-05-09 31