(PHP >= 5.3.0)
XSLTProcessor::setProfiling — Setzt den Dateinamen für die Ausgaben des Profilers
$filename
) : boolSetzt den Dateinamen für die Ausgaben des Profilers während der Verarbeitung eines Stylesheets.
filenamePfad zur Datei, in die die Informationen geschrieben werden
Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.
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);
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