Bug #14712 Updated: allways global scope

From: Date: Mon, 29 Apr 2002 00:02:00 +0000
Subject: Bug #14712 Updated: allways global scope
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-6387@lists.php.net to get a copy of this message
ID: 14712 Updated by: jimw@php.net Reported By: roberto@berto.net -Status: Open +Status: Duplicate Bug Type: Feature/Change Request Operating System: all PHP Version: 4.1.0 New Comment: duplicate of #12669. Previous Comments: ------------------------------------------------------------------------ [2001-12-27 02:10:51] roberto@berto.net 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 this bug report at http://bugs.php.net/?id=14712&edit=1

« previous php.bugs (#6387) next »