(PHP >= 5.3.0, PHP 7, PHP 8)
XSLTProcessor::setProfiling — Setzt den Dateinamen für die Ausgaben des Profilers
$filename
): trueSetzt den Namen der Datei für die Ausgaben des Profilers während der Verarbeitung eines Stylesheets.
filename
Pfad zur Datei, in die die Informationen geschrieben werden
Gibt immer true
zurück.
Beispiel #1 Ausgabe des Profilers
<?php
// Laden der XML/XSL-Quelldokomente
$xml = new DOMDocument;
$xml->load('collection.xml');
$xsl = new DOMDocument;
$xsl->load('collection.xsl');
// Prozessor instantiieren und konfigurieren
$proc = new XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl); // Anhängen der xsl-Regeln
echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
?>
Der obige Quelltext erzeugt ungefähr die nachfolgende Ausgabe in der angegebenen Zieldatei:
number match name mode Calls Tot 100us Avg 0 cd 2 3 1 1 collection 1 1 1 Total 3 4