Req #13280 [Opn->Bgs]: suggestions about variables scope, warnning
| From: | jani@php.net | Date: | Fri, 17 Dec 2010 12:10:44 +0000 |
| Subject: | Req #13280 [Opn->Bgs]: suggestions about variables scope, warnning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157042@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=13280&edit=1
ID: 13280
Updated by: jani@php.net
Reported by: Xuefer at 21cn dot com
Summary: suggestions about variables scope, warnning
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: any
PHP Version: 4.0.6
Block user comment: N
Private report: N
New Comment:
We have superglobals nowadays.. no idea what else you need. Utterly
super globals also are suggested in other FRs. Closing this..
Previous Comments:
------------------------------------------------------------------------
[2001-09-13 03:43:05] Xuefer at 21cn dot com
suggestions
1. any variables start with $_ and $PHP_ and also $HTTP_
should be always global
no need to use such as
global $PHP_SELF;
if possible, set_global_all(true); makes variables scope just like
c/java do
2. if we access $PHP_POST_VARS['...'] and it's not set
should trigger an special warnning, not a normal warnning
cause it's not that variables we can initize
so that, we can easily turn off the special warnning without ignoring
the other normal warnning.
3. we don't like
$a = 0;
to initize an variable, we like
int $a; // it's auto initized into 0
or
int $a=1234;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=13280&edit=1