[PHP-DEV] Bug #15202 Updated: not a bug, but new feature request

2002-01-24 Thread yohgaki

ID: 15202
Updated by: yohgaki
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.1.1
New Comment:

I agree with hholzgra.
Mark this as bogus. Ok?


Previous Comments:


[2002-01-24 07:11:19] [EMAIL PROTECTED]

global variables are evil ;)

no, serious, it would be hard to track down 
if statements outside of a function 
(maybe in a totaly different file)
could affect the scope of variables inside
a function

either stay with global declarations or
make use of the special $GLOABLS array

or even better: try to design your code
so that it doesn't rely on globals at all
(the global declaration for functions 
was invented for a reason)

some keywords: side effects, reentrancy,
thread safety (not a php issue yet),
obfuscation ...



[2002-01-24 06:20:42] [EMAIL PROTECTED]

Using "global" is very unfriendly (you have many of them and have to
declare them everytime and everywhere).
You change something and a mess is rising.

I have this idea:



Today "global" located in the root do nothing. By my idea it should be
"an absolute global" like $GLOBALS.
 Then you will be able to use this variable everywhere without defining
it by global everytime.





Edit this bug report at http://bugs.php.net/?id=15202&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #15202 Updated: not a bug, but new feature request

2002-01-24 Thread hholzgra

ID: 15202
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux
PHP Version: 4.1.1
New Comment:

global variables are evil ;)

no, serious, it would be hard to track down 
if statements outside of a function 
(maybe in a totaly different file)
could affect the scope of variables inside
a function

either stay with global declarations or
make use of the special $GLOABLS array

or even better: try to design your code
so that it doesn't rely on globals at all
(the global declaration for functions 
was invented for a reason)

some keywords: side effects, reentrancy,
thread safety (not a php issue yet),
obfuscation ...


Previous Comments:


[2002-01-24 06:20:42] [EMAIL PROTECTED]

Using "global" is very unfriendly (you have many of them and have to
declare them everytime and everywhere).
You change something and a mess is rising.

I have this idea:



Today "global" located in the root do nothing. By my idea it should be
"an absolute global" like $GLOBALS.
 Then you will be able to use this variable everywhere without defining
it by global everytime.





Edit this bug report at http://bugs.php.net/?id=15202&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]