PHP 8.3.4 Released!

XSLTProcessor::setProfiling

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

XSLTProcessor::setProfilingProfil çıktı dosyasını belirler

Açıklama

public XSLTProcessor::setProfiling(?string $dosya): true

Bir biçembent uygulanırken oluşan profil bilgisini belirtilen dosyaya çıktılar.

Bağımsız Değişkenler

dosya

Profil bilgisinin döküleceği dosyanın yolu.

Dönen Değerler

Daima true döndürür.

Örnekler

Örnek 1 - Profil bilgisi çıktılama örneği

<?php
// XML belgeyi yükleyelim
$xml = new DOMDocument;
$xml->load('collection.xml');

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

// Dönüştürücüyü yapılandıralım
$proc = new XSLTProcessor;
$proc->setProfiling('profiling.txt');
$proc->importStyleSheet($xsl); // XSL kuralları

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

Üretilen profil bilgisi:

number               match                name      mode  Calls Tot 100us Avg

    0                   cd                                    2      3      1
    1           collection                                    1      1      1

                         Total                                3      4

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top