php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14712 allways global scope
Submitted: 2001-12-27 02:10 UTC Modified: 2002-04-28 20:02 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: roberto at berto dot net Assigned:
Status: Duplicate Package: Feature/Change Request
PHP Version: 4.1.0 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: roberto at berto dot net
New email:
PHP Version: OS:

 

 [2001-12-27 02:10 UTC] roberto at berto dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 20:02 UTC] jimw@php.net
duplicate of #12669.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 04:01:29 2024 UTC