--TEST-- Special operations with XSLTProcessor properties --EXTENSIONS-- xsl dom --FILE-- loadXML('hello'); function test() { echo "Called test\n"; } $xsl = new DOMDocument; $xsl->loadXML(<< XML); echo "--- Unset cloneDocument ---\n"; $xslt = new XSLTProcessor; $xslt->registerPHPFunctions(); unset($xslt->cloneDocument); try { $xslt->importStylesheet($xsl); } catch (Error $e) { echo $e->getMessage(), "\n"; } echo "--- Unset doXInclude ---\n"; $xslt = new XSLTProcessor; $xslt->registerPHPFunctions(); unset($xslt->doXInclude); $xslt->importStylesheet($xsl); try { echo $xslt->transformToXml($xml); } catch (Error $e) { echo $e->getMessage(), "\n"; } echo "--- Make properties references ---\n"; $xslt = new XSLTProcessor; $xslt->registerPHPFunctions(); $clone =& $xslt->cloneDocument; $xinclude =& $xslt->doXInclude; $xslt->importStylesheet($xsl); echo $xslt->transformToXml($xml); ?> --EXPECT-- --- Unset cloneDocument --- Typed property XSLTProcessor::$cloneDocument must not be accessed before initialization --- Unset doXInclude --- Typed property XSLTProcessor::$doXInclude must not be accessed before initialization --- Make properties references --- Called test hello