XSL XSLTProcessor::setProfiling
(PHP >= 5.3.0, PHP 7, PHP 8)
XSLTProcessor::setProfiling — 프로파일링 출력 파일 설정
설명
public XSLTProcessor::setProfiling(?string $filename
): bool
스타일시트를 처리할 때 프로파일링 정보를 출력하도록 파일을 설정합니다.
매개변수
filename
- 프로파일링 정보를 덤프할 파일의 경로입니다.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
Examples
예제 #1 프로파일링 출력 예시
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('collection.xml');
$xsl = new DOMDocument;
$xsl->load('collection.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl); // attach the xsl rules
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