php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #11379 Local/Global variable scope inside functions
Submitted: 2001-06-09 15:04 UTC Modified: 2002-02-24 03:59 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: germain at ebooksfrance dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.5 OS: any
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: germain at ebooksfrance dot com
New email:
PHP Version: OS:

 

 [2001-06-09 15:04 UTC] germain at ebooksfrance dot com
Hello,

I just wanted to tell you that hidding Global scope variables when you are inside a function seems really totally weird to me...

Why do I have to make a Global statement with hundreds of variables names each time I want to build a function ?
I had created those as Global in the main code, so why the hell should I declare them global again ???

Now each time I want to build a function, I think twice about it because there are so much scope troubles that it is very hard to do... aren't functions supposed to simplify the code ?

Anyway, thanks you very much for PHP, it is a great language... to me, it would be absolutely perfect without this scope problem

Germain

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 03:35 UTC] roberto at berto dot net
I suggest the creating of a allways global scope's function like at http://bugs.php.net/bug.php?id=14712
 [2002-02-24 03:59 UTC] yohgaki@php.net
Sorry. It probably won't happen.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 25 06:03:33 2022 UTC