XSLTProcessor::setProfiling

(PHP >= 5.3.0, PHP 7, PHP 8)

XSLTProcessor::setProfilingプロファイル情報の出力ファイルを設定する

説明

publicXSLTProcessor::setProfiling(?string$filename): true

スタイルシート処理時のプロファイル情報を出力するファイルを設定します。

パラメータ

filename

プロファイル情報を出力するファイルへのパス。

戻り値

常に true を返します。

例1 プロファイル出力の例

<?php
// XML ソースを読み込みます
$xml = new DOMDocument;
$xml->load('collection.xml');

$xsl = new DOMDocument;
$xsl->load('collection.xsl');

// 変換器を設定します
$proc = new XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl); // xsl ルールをアタッチします

echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
?>

上のコードは、ファイルの処理時に次のような情報を出力します。

number match name mode Calls Tot 100us Avg 0 cd 2 3 1 1 collection 1 1 1 Total 3 4
To Top