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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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 Dec 22 04:01:29 2024 UTC