php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16981 Variable Scrope suggestion
Submitted: 2002-05-02 18:51 UTC Modified: 2002-05-02 22:23 UTC
From: Lakario at msn dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.1.2 OS: Windows XP
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: Lakario at msn dot com
New email:
PHP Version: OS:

 

 [2002-05-02 18:51 UTC] Lakario at msn dot com
Okay basically this isn't a bug, more of an annoyance though I thought it should be pointed out.

As you all know variable scope in functions determines that $var1 outside a function is not the same a $var1 inside the function, so you must pass $var1 to the function.  Basic stuff.

Anyhow, there are many variables built into PHP such as $PHP_SELF that still comply to the variable scope rules, which I think is *very* annoying.  I do not think it should be necessary to pass something like $PHP_SELF to your function if you need to call it within.  I dunno, maybe I'm just whining, but there you have it.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-02 18:58 UTC] Lakario at msn dot com
Sorry bout that, I figured out what I wasn't doing...
 [2002-05-02 22:23 UTC] rodif_bl@php.net
bogusing....
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 18:01:32 2024 UTC