Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Basic VarnishAdmin usageBasic VarnishLog usage>
^ExamplesLast updated: Mon, 26 Oct 2026

Basic VarnishStat usage

The example illustrates getting varnish statistic snapshot from shared memory

Example #1 Get statistic snapshot

<?php

$vs = new VarnishStat;

try {
    $data = $vs->getSnapshot();
} catch (VarnishException $e) {
    echo $e->getMessage();
    exit(3);
}

exit(0);
?>

<Basic VarnishAdmin usageBasic VarnishLog usage>
^ExamplesLast updated: Mon, 26 Oct 2026