Bug #14712: allways global scope
| From: | roberto at berto dot net | Date: | Thu, 27 Dec 2001 07:10:51 +0000 |
| Subject: | Bug #14712: allways global scope | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75088@lists.php.net to get a copy of this message | ||
From: roberto@berto.net
Operating system: all
PHP version: 4.1.0
PHP Bug Type: Feature/Change Request
Bug description: allways global scope
Will be cool if a new language constructor set global scope to a variable,
like $_REQUEST, $_POST, etc.
This "forever global" constructor should work with every type of variable
(array,object,resource,string, etc)
So,
<?PHP
$smarty->template_dir = "/lib/here/";
forever $smarty;
function something() {
// output "/lib/here";
print $smarty->template_dir;
}
// output "/lib/here";
print $smarty->template_dir;
class foo {
function other () {
// output "/lib/here";
print $smarty->template_dir;
}
}
Thanx.
--
Edit bug report at: http://bugs.php.net/?id=14712&edit=1