|  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
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
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)



$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;




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 20:02 UTC]
duplicate of #12669.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 07:05:44 2022 UTC