|  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
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.
Block user comment
Status: Assign to:
Bug Type:
From: germain at ebooksfrance dot com
New email:
PHP Version: OS:


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

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



Add a Patch

Pull Requests

Add a Pull Request


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
 [2002-02-24 03:59 UTC]
Sorry. It probably won't happen.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 13:01:29 2024 UTC