\n"; } function test2() { global $var; /* extern */ $var = 2; /* now we actually change the global */ echo $var . "
\n"; } function test3() { /* local var with ability to retain value in multiple calls */ static $var = 0; echo "test3 var: {$var}
\n"; $var++; } test1(); echo $var . "

\n"; test2(); echo $var . "
\n"; test3(); test3(); test3(); test3(); test3(); echo $var; ?>