1--TEST--
2Fork of bug33853.phpt with exit replaced by throw
3--EXTENSIONS--
4xsl
5--FILE--
6<?php
7
8spl_autoload_register(function ($className) {
9    var_dump($className);
10    throw new Exception("Autoload exception");
11});
12
13$xsl = new DomDocument();
14$xsl->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
15<xsl:stylesheet version="1.0"
16xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
17xmlns:php="http://php.net/xsl">
18<xsl:template match="/">
19<xsl:value-of select="php:function(\'TeSt::dateLang\')" />
20</xsl:template>
21</xsl:stylesheet>');
22$inputdom = new DomDocument();
23$inputdom->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
24<today></today>');
25
26$proc = new XsltProcessor();
27$proc->registerPhpFunctions();
28$xsl = $proc->importStylesheet($xsl);
29try {
30    $newdom = $proc->transformToDoc($inputdom);
31} catch (Exception $e) {
32    echo $e->getMessage(), "\n";
33}
34?>
35===DONE===
36--EXPECT--
37string(4) "TeSt"
38Autoload exception
39===DONE===
40