public static function makePostCage($config_file = null, $strict = true) { /** * @staticvar $_instance */ static $_instance; if (!isset($_instance)) { $_instance = Cage::factory($_POST, $config_file, '_POST', $strict); } $GLOBALS['HTTP_POST_VARS'] = null; return $_instance; }
/** * second level of scoping * */ function testScoping2() { $cage_POST = Inspekt::makePostCage(); echo "<pre>In " . __FUNCTION__ . "(): "; var_dump($cage_POST->testAlnum('/funky,_+=_\\|;:!@#$%^&*~time/0/0/`~foo,.+=_\\|;:!@#$%^&*~-bar')); echo "</pre>\n"; echo "<pre>POST is not accessible here: "; var_dump($_POST); echo "</pre>\n"; }