I don't know if you want a work-around or just to moan at PHP (which is a totally normal thing to do!) but one idea would be a global associative array. The Wordpress file: [code] global $wplocal = array(); $wp = new WP(); $foo = foo(); $bar = bar(); /* this saves on typing array('foo' => foo, ...), but is overkill for just one or two globals. */ $local_vars = array('wp', 'foo', 'bar'); foreach ($local_vars as $value) { $wplocal[$value] = $$value; } function wordpressFun1() { global $wplocal; $local_vars = array('wp', 'foo', 'bar'); foreach ($local_vars as $value) { $$value = $wplocal[$value]; } $wp->doSomething($foo, $bar); } function wordpressFun2() { global $wplocal; $local_vars = array('wp', 'just_foo'); foreach ($local_vars as $value) { $$value = $wplocal[$value]; } $wp->doSomething($just_foo); } [/code] Obviously that could be annoying to do to every script. This post is from -- http://socoder.net/index.php?topic=2758