xref: /PHP-8.2/ext/xsl/tests/bug33853.phpt (revision 74859783)
1--TEST--
2Bug #33853 (php:function call __autoload with lowercase param)
3--EXTENSIONS--
4xsl
5--FILE--
6<?php
7
8spl_autoload_register(function ($className) {
9    var_dump($className);
10    exit();
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);
29$newdom = $proc->transformToDoc($inputdom);
30?>
31===DONE===
32--EXPECT--
33string(4) "TeSt"
34