PHP Example
Screen shot
To use of Static Variable and Variable.

<?php
function show()
{
static $counter=0;
$counter2=0;
echo "<br>"."This is static variable : ".$counter;
echo "<br>"."This is non static variable : ".$counter2;
echo "<br>";
return $counter=$counter+1;
return $counter2=$counter2+1;
}

show();
show();
show();
?>