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