- test1: documentation ( source)
<?php
function test1($unset = false) {
static $bar = 1;
$bar++;
echo $bar;
unset($bar);
$bar = "|";
echo $bar;
// this initialization value is hoisted to the top of the function!
static $bar = 5;
$bar++;
echo $bar;
echo " ";
}
test1();
test1();
test1();
test1();