/**
* My foo() method
* @return void
* @uses $_POST['bar'] directly
*/
public function foo()
{
echo "I use ", $_POST['bar'], "... :-)";
}
另一个选项可能是 @global 标签:
/**
* My bar() method
* @return void
* @global mixed uses the 'bar' key from the $_POST superglobal directly
*/
public function foo()
{
global $_POST;
echo "I use ", $_POST['bar'], "... :-)";
}