|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-28 20:02 UTC] jimw@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
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.