@staticvar
Document a static variable's use in a function/method
Gregory Beaver
Copyright 2002, Gregory Beaver
(phpDocumentor 1.1+)
@staticvar
datatype
description
Description
Datatype should be a valid PHP type or "mixed."
phpDocumentor will display the optional description unmodified
Example
Here's an example:
/**
* example of basic @staticvar usage in a function
* @staticvar integer used to calculate the division tables
* @staticvar array $bar is used to make me happy. Note that $bar is part of the description
* @param bool $baz
* @return mixed
*/
function function1($baz)
{
static $foo = 6,$bar = array();
// note that this works as:
// static $foo = 6;
// static $bar = array();
if ($baz)
{
$a = 5;
} else
{
$a = array(1,4);
}
return $a;
}
Documentation generated on Mon, 05 Dec 2011 21:18:40 -0600 by phpDocumentor 1.4.4